72% wp-headmaster

Code Review | WP Headmaster

WordPress plugin WP Headmaster scored 72% from 54 tests.

About plugin

  • Plugin page: wp-headmaster
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2013
  • Latest release: Feb 21, 2014
  • Number of updates: 10
  • Update frequency: every 25.4 days
  • Top authors: bavington (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 4,314 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▲1.13ms] Passed 4 tests

A check of server-side resources used by WP Headmaster
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0448.83 ▲5.09
Dashboard /wp-admin3.33 ▲0.0357.17 ▲7.02
Posts /wp-admin/edit.php3.38 ▲0.0354.82 ▲0.01
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.14 ▼6.10
Media Library /wp-admin/upload.php3.25 ▲0.0341.36 ▲5.50
WP Headmaster /wp-admin/options-general.php?page=Headmaster3.3741.56

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Headmaster
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲5513.24 ▼1.192.16 ▲0.5338.06 ▼7.75
Dashboard /wp-admin2,207 ▲74.83 ▼0.02101.24 ▼5.9641.77 ▲2.82
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0236.65 ▼4.1833.77 ▼1.60
Add New Post /wp-admin/post-new.php6,495 ▲4,96223.21 ▼0.06875.38 ▲180.1585.45 ▲28.59
Media Library /wp-admin/upload.php1,392 ▲74.32 ▲0.1398.15 ▼2.0840.78 ▼2.66
WP Headmaster /wp-admin/options-general.php?page=Headmaster1,9465.20106.9346.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=Headmaster
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Headmaster
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=Headmaster
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-headmaster/creare-footer.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-headmaster/wp-headmaster.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-headmaster/wp-headmaster-settings.php:2

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 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: Please specify the plugin name on the first line ( === wp-headmaster === )
Please take inspiration from this readme.txt

wp-headmaster/wp-headmaster.php Passed 13 tests

The main PHP file in "WP Headmaster" ver. 0.3 adds more information about the plugin and also serves as the entry point for this plugin
104 characters long description:
A simple plugin for adding, enqueuing and organising common items into the Head tag without hard-coding.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin692 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP312320612
JavaScript3231855
CSS14025

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity20.00
▷ Minimum class complexity10.00
▷ Maximum class complexity30.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ 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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/apple-reflected-shine.png2.77KB2.29KB▼ 17.15%