84% additional-content

Code Review | Additional Content

WordPress plugin Additional Content scored84%from 54 tests.

About plugin

  • Plugin page: additional-content
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Apr 7, 2020
  • Number of updates: 27
  • Update frequency: every 60.4 days
  • Top authors: keesiemeijer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /6,149 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.28ms] Passed 4 tests

This is a short check of server-side resources used by Additional Content
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.85 ▼2.49
Dashboard /wp-admin3.40 ▲0.0546.05 ▼14.73
Posts /wp-admin/edit.php3.51 ▲0.1545.74 ▼1.89
Add New Post /wp-admin/post-new.php6.05 ▲0.1690.95 ▼6.01
Media Library /wp-admin/upload.php3.32 ▲0.0933.45 ▲0.23

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Additional Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.154.58 ▲2.6441.44 ▼9.69
Dashboard /wp-admin2,206 ▲184.85 ▼0.04108.16 ▲1.9338.00 ▼5.72
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0340.47 ▲6.4934.11 ▲1.98
Add New Post /wp-admin/post-new.php6,287 ▲4,75419.29 ▼3.85893.41 ▲208.8461.82 ▼5.09
Media Library /wp-admin/upload.php1,388 ▲34.27 ▲0.0992.78 ▼23.3641.43 ▼5.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: describedby in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php on line 4
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php on line 4
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php on line 3
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php:4
    • > PHP Notice
      Undefined variable: label in wp-content/plugins/additional-content/includes/partials/repeatable-fields.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: publish, edit, post content, extra, shortcodes...

additional-content/additional-content.php 85% from 13 tests

Analyzing the main PHP file in "Additional Content" version 1.3.0
Please take the time to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,032 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP16286544872
JavaScript24218133
JSON20027

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity20.25
▷ Minimum class complexity5.00
▷ Maximum class complexity39.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods2982.86%
▷ Protected methods00.00%
▷ Private methods617.14%
Functions22
▷ Named functions2195.45%
▷ Anonymous functions14.55%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected