10% wp-admin-buttons

Code Review | WP Admin Buttons

WordPress plugin WP Admin Buttons scored10%from 54 tests.

About plugin

  • Plugin page: wp-admin-buttons
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.0
  • WordPress version: 6.3.1
  • First release: Jan 30, 2015
  • Latest release: Feb 1, 2015
  • Number of updates: 15
  • Update frequency: every 0.2 days
  • Top authors: miunosoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,006 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-admin-buttons/include/library/admin-page-framework/wp-admin-buttons-admin-page-framework.min.php+4428
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.65ms] Passed 4 tests

Server-side resources used by WP Admin Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.80 ▲2.75
Dashboard /wp-admin3.36 ▲0.0250.86 ▼12.18
Posts /wp-admin/edit.php3.48 ▲0.1246.06 ▲3.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.92 ▼27.57
Media Library /wp-admin/upload.php3.29 ▲0.0638.40 ▼1.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_wpadminbuttons_widget
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Admin Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.25 ▼0.101.68 ▼0.2445.60 ▲1.20
Dashboard /wp-admin2,198 ▲185.57 ▲0.0689.04 ▼1.5538.17 ▼3.60
Posts /wp-admin/edit.php2,097 ▼32.00 ▲0.0435.25 ▼1.2033.11 ▼4.95
Add New Post /wp-admin/post-new.php1,526 ▼1123.55 ▲5.24684.07 ▲49.4861.40 ▼7.33
Media Library /wp-admin/upload.php1,403 ▼04.21 ▲0.0395.96 ▼13.6540.93 ▼4.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_wpadminbuttons_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WPAdminButtons_AdminPageFramework_Widget' not found in wp-content/plugins/wp-admin-buttons/include/class/widget/WPAdminButtons_Widget.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPAdminButtons_Registry' not found in wp-content/plugins/wp-admin-buttons/include/class-list.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPAdminButtons_AdminPageFramework_PluginBootstrap' not found in wp-content/plugins/wp-admin-buttons/include/class/boot/WPAdminButtons_Bootstrap.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/wp-admin-buttons/include/library/admin-page-framework/wp-admin-buttons-admin-page-framework.min.php:7466
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/wp-admin-buttons/include/library/admin-page-framework/wp-admin-buttons-admin-page-framework.min.php:7466

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: button, buttons, link button, admin-ui, shortcode...

wp-admin-buttons/wp-admin-buttons.php Passed 13 tests

"WP Admin Buttons" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
Displays WordPress admin style buttons in the front end.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin7,441 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP112032,4837,319
Markdown1450122

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity13.21
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes181
▷ Abstract classes7340.33%
▷ Concrete classes10859.67%
▷ Final classes54.63%
Methods970
▷ Static methods13413.81%
▷ Public methods57258.97%
▷ Protected methods23724.43%
▷ Private methods16116.60%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants00.00%
▷ Class constants27100.00%
▷ Public constants27100.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
There are no PNG files in this plugin