68% better-admin-help-tabs

Code Review | Better Admin Help Tabs

WordPress plugin Better Admin Help Tabs scored68%from 54 tests.

About plugin

  • Plugin page: better-admin-help...
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2014
  • Latest release: Jul 2, 2016
  • Number of updates: 19
  • Update frequency: every 40.0 days
  • Top authors: ssuess (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /4,817 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼41.78ms] Passed 4 tests

Analyzing server-side resources used by Better Admin Help Tabs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6816.60 ▼20.73
Dashboard /wp-admin2.82 ▼0.4818.91 ▼32.61
Posts /wp-admin/edit.php2.82 ▼0.5317.51 ▼31.05
Add New Post /wp-admin/post-new.php2.82 ▼3.0617.17 ▼82.72
Media Library /wp-admin/upload.php2.82 ▼0.4116.28 ▼17.34
All Help Tabs /wp-admin/edit.php?post_type=sbah_helptab2.8216.57
BAH Options /wp-admin/edit.php?post_type=sbah_helptab&page=sbah_options2.8217.57
Add New /wp-admin/post-new.php?post_type=sbah_helptab2.8218.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Better Admin Help Tabs: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲23614.73 ▲0.461.79 ▲0.1143.94 ▼3.80
Dashboard /wp-admin2,377 ▲1896.46 ▲1.62127.49 ▲10.7643.00 ▼0.19
Posts /wp-admin/edit.php2,280 ▲1943.30 ▲1.3051.37 ▲15.8033.82 ▲1.89
Add New Post /wp-admin/post-new.php1,569 ▲4123.25 ▲4.92577.18 ▼30.7732.31 ▼19.98
Media Library /wp-admin/upload.php1,419 ▲314.14 ▼0.0377.80 ▼16.5144.46 ▲3.51
All Help Tabs /wp-admin/edit.php?post_type=sbah_helptab1,2503.2651.8228.86
BAH Options /wp-admin/edit.php?post_type=sbah_helptab&page=sbah_options1,0463.0036.7625.91
Add New /wp-admin/post-new.php?post_type=sbah_helptab2,2628.10177.9367.21

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/better-admin-help-tabs/cmbclass/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sbah_helptab
    • > Warning in wp-content/plugins/better-admin-help-tabs/cmbclass/init.php+746
    count(): Parameter must be an array or an object that implements Countable
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sbah_helptab
    • > Notice in wp-content/plugins/better-admin-help-tabs/better-admin-help-tabs.php+275
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/better-admin-help-tabs/cmbclass/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/better-admin-help-tabs/better-admin-help-tabs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-help-tabs/sbah-options.php:5

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (The config page for my example help tab.), #2 (The example help tab and sidebar in action.)
You can take inspiration from this readme.txt

better-admin-help-tabs/better-admin-help-tabs.php Passed 13 tests

"Better Admin Help Tabs" version 1.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Admin Help Tabs for WP Admin. These will work on any post type or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin4,895 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript43063742,169
PHP86281,0361,956
CSS26121540
Markdown1660230

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity66.50
▷ Minimum class complexity20.00
▷ Maximum class complexity136.00
Average method complexity3.95
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods133
▷ Static methods3425.56%
▷ Public methods13198.50%
▷ Protected methods21.50%
▷ Private methods00.00%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
16 PNG files occupy 0.30MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png133.07KB46.93KB▼ 64.73%
cmbclass/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
cmbclass/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
cmbclass/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
cmbclass/images/ico-delete.png0.70KB0.72KB0.00%