68% better-admin-pointers

Code Review | Better Admin Pointers

WordPress plugin Better Admin Pointers scored68%from 54 tests.

About plugin

  • Plugin page: better-admin-poin...
  • Plugin version: 2.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: Apr 14, 2016
  • Number of updates: 71
  • Update frequency: every 9.8 days
  • Top authors: ssuess (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /4,340 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.55MB] [CPU: ▼32.33ms] Passed 4 tests

A check of server-side resources used by Better Admin Pointers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4046.38 ▲2.69
Dashboard /wp-admin3.39 ▲0.0929.15 ▼21.13
Posts /wp-admin/edit.php3.39 ▲0.0428.33 ▼21.95
Add New Post /wp-admin/post-new.php3.39 ▼2.4929.75 ▼74.49
Media Library /wp-admin/upload.php3.39 ▲0.1724.64 ▼11.76
All Pointers /wp-admin/edit.php?post_type=sbap_pointer3.3928.23
BAP Options /wp-admin/edit.php?post_type=sbap_pointer&page=sbap_options3.3935.25
Add New /wp-admin/post-new.php?post_type=sbap_pointer3.3923.63

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Better Admin Pointers
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12713.31 ▼1.344.64 ▲2.5841.77 ▼2.03
Dashboard /wp-admin2,245 ▲575.82 ▲0.9397.16 ▼9.1039.71 ▼1.72
Posts /wp-admin/edit.php2,134 ▲452.09 ▲0.1141.58 ▲2.3034.79 ▼1.66
Add New Post /wp-admin/post-new.php1,547 ▲1523.35 ▲0.22675.02 ▲57.5451.25 ▼5.15
Media Library /wp-admin/upload.php1,427 ▲424.21 ▲0.0196.29 ▼6.6948.54 ▲2.46
All Pointers /wp-admin/edit.php?post_type=sbap_pointer1,0982.0033.9629.25
BAP Options /wp-admin/edit.php?post_type=sbap_pointer&page=sbap_options8982.0923.7326.10
Add New /wp-admin/post-new.php?post_type=sbap_pointer2,3617.59187.7463.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/better-admin-pointers/better-admin-pointers.php+608
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=sbap_pointer
    • > Notice in wp-content/plugins/better-admin-pointers/better-admin-pointers.php+608
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/better-admin-pointers/better-admin-pointers.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-pointers/CMB2/init.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-pointers/sbap-options.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-admin-pointers/CMB2/example-functions.php:68

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (The config page for my example pointer.), #2 (The example pointer in action.)
You can take inspiration from this readme.txt

better-admin-pointers/better-admin-pointers.php Passed 13 tests

"Better Admin Pointers" version 2.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
70 characters long description:
Admin pointers 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 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 detected14,969 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS82,0222,0488,500
PHP171,2172,4304,013
PO File54916191,170
JavaScript4228147927
Markdown21270359

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity42.47
▷ Minimum class complexity3.00
▷ Maximum class complexity130.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods227
▷ Static methods229.69%
▷ Public methods21594.71%
▷ Protected methods93.96%
▷ Private methods31.32%
Functions53
▷ Named functions53100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
16 PNG files occupy 0.38MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
CMB2/images/ico-delete.png0.70KB0.72KB0.00%
screenshot-1.png172.76KB65.73KB▼ 61.95%
screenshot-2.png194.64KB61.85KB▼ 68.23%
CMB2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%