84% content-between-paragraph

Code Review | Content Between Paragraphs

WordPress plugin Content Between Paragraphs scored84%from 54 tests.

About plugin

  • Plugin page: content-between-p...
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Aug 8, 2019
  • Latest release: Aug 18, 2019
  • Number of updates: 12
  • Update frequency: every 0.8 days
  • Top authors: francescosganga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /656 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.04ms] Passed 4 tests

An overview of server-side resources used by Content Between Paragraphs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.39 ▼9.46
Dashboard /wp-admin3.33 ▲0.0251.11 ▼12.16
Posts /wp-admin/edit.php3.38 ▲0.0256.23 ▲0.34
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.42 ▼10.86
Media Library /wp-admin/upload.php3.25 ▲0.0240.07 ▲0.74
CBP /wp-admin/admin.php?page=cbp-options3.2232.92
About /wp-admin/admin.php?page=cbp-option-about3.2233.49

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Content Between Paragraphs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲8014.28 ▲0.011.92 ▲0.0442.73 ▲1.69
Dashboard /wp-admin2,216 ▲395.53 ▼0.1490.55 ▼0.9744.09 ▲2.65
Posts /wp-admin/edit.php2,130 ▲271.98 ▲0.0036.16 ▼9.0538.39 ▼0.68
Add New Post /wp-admin/post-new.php1,548 ▲2023.27 ▲0.04649.46 ▲26.5372.76 ▲25.97
Media Library /wp-admin/upload.php1,430 ▲304.21 ▼0.1098.50 ▼2.6143.55 ▼0.10
CBP /wp-admin/admin.php?page=cbp-options8382.0324.0329.18
About /wp-admin/admin.php?page=cbp-option-about8042.1525.0127.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-between-paragraph/content-between-paragraphs.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: content, insert, between, paragraphs, ads

content-between-paragraph/content-between-paragraphs.php 92% from 13 tests

The main PHP script in "Content Between Paragraphs" version 1.5 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("content-between-paragraph.php" instead of "content-between-paragraphs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected74 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP112974

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin