84% post-head-includes

Code Review | Post Head Includes

WordPress plugin Post Head Includes scored84%from 54 tests.

About plugin

  • Plugin page: post-head-includes
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 14, 2013
  • Latest release: Aug 25, 2013
  • Number of updates: 13
  • Update frequency: every 7.9 days
  • Top authors: rbuczynski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,358 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.61MB] [CPU: ▼20.47ms] Passed 4 tests

An overview of server-side resources used by Post Head Includes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0446.96 ▼0.74
Dashboard /wp-admin3.39 ▲0.0853.34 ▼9.20
Posts /wp-admin/edit.php3.50 ▲0.1455.17 ▲3.31
Add New Post /wp-admin/post-new.php3.24 ▼2.6538.46 ▼72.78
Media Library /wp-admin/upload.php3.31 ▲0.0839.08 ▲0.84

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Post Head Includes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.59 ▲0.212.14 ▲0.0547.05 ▼1.03
Dashboard /wp-admin2,198 ▲215.63 ▲0.0395.38 ▲8.2138.17 ▼3.57
Posts /wp-admin/edit.php2,103 ▲61.98 ▲0.0037.68 ▼1.5533.98 ▼0.67
Add New Post /wp-admin/post-new.php6,633 ▲5,10527.35 ▲4.39968.53 ▲274.5562.41 ▲13.56
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.01100.64 ▼14.3345.59 ▼2.51

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-head-includes/plugin.php:263
    • > PHP Notice
      Undefined variable: _postheadincludes in wp-content/plugins/post-head-includes/post-meta.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-head-includes/post-meta.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version not formatted correctly
You can take inspiration from this readme.txt

post-head-includes/plugin.php 92% from 13 tests

Analyzing the main PHP file in "Post Head Includes" version 0.2.1
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("post-head-includes.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin615 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6129302481
JavaScript132383
CSS13051

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.50
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods3786.05%
▷ Protected methods613.95%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected