83% old-skool-admin-head

Code Review | Old Skool Admin Head

WordPress plugin Old Skool Admin Head scored83%from 54 tests.

About plugin

  • Plugin page: old-skool-admin-head
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.3
  • WordPress version: 6.3.1
  • First release: Dec 18, 2011
  • Latest release: Dec 29, 2011
  • Number of updates: 12
  • Update frequency: every 2.1 days
  • Top authors: gilgimech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Old Skool Admin Head
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.39 ▼7.28
Dashboard /wp-admin3.32 ▲0.0250.74 ▲1.83
Posts /wp-admin/edit.php3.44 ▲0.0849.60 ▲2.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.97 ▼1.81
Media Library /wp-admin/upload.php3.25 ▲0.0233.91 ▲1.24
Old Skool Admin /wp-admin/options-general.php?page=osha-options3.2626.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
osah_settings
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Old Skool Admin Head
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.24 ▼1.131.52 ▼0.4140.39 ▼6.04
Dashboard /wp-admin2,210 ▲245.87 ▼0.05113.94 ▲3.4545.04 ▲3.59
Posts /wp-admin/edit.php2,093 ▲222.00 ▼0.0240.25 ▲3.3534.38 ▼0.47
Add New Post /wp-admin/post-new.php1,545 ▲318.09 ▼0.18649.24 ▼21.6059.20 ▲1.04
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0498.64 ▲3.5244.50 ▲2.29
Old Skool Admin /wp-admin/options-general.php?page=osha-options8162.0625.2126.08

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      include(/admin/admin-page.php): failed to open stream: No such file or directory in wp-content/plugins/old-skool-admin-head/includes/class.admin.php on line 10
    • > PHP Notice
      Undefined variable: wp_plugin_dir in wp-content/plugins/old-skool-admin-head/includes/class.admin.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/old-skool-admin-head/admin/dis-admin-form.php:3
    • > PHP Warning
      include(): Failed opening '/admin/admin-page.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/old-skool-admin-head/includes/class.admin.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/old-skool-admin-head/oldskool-admin-head.php:61

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Please fix this invalid URI: "none"
  • Screenshots: These screenshots require images: #1 (Options Page), #2 (Diasable Toolbar), #3 (Enable Admin Head), #4 (Diasable Toolbar and Enable Admin Head)
The official readme.txt might help

old-skool-admin-head/oldskool-admin-head.php 92% from 13 tests

Analyzing the main PHP file in "Old Skool Admin Head" version 1.1
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("old-skool-admin-head.php" instead of "oldskool-admin-head.php")

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
There were no executable files found in this plugin416 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9136195258
CSS220142
JavaScript11216

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity2.62
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrows-dark.png0.48KB0.24KB▼ 51.11%
images/wp-logo.png0.83KB0.77KB▼ 7.18%
images/arrows.png0.48KB0.24KB▼ 50.81%