78% admin-menu-slide

Code Review | Admin Menu Slide

WordPress plugin Admin Menu Slide scored78%from 54 tests.

About plugin

  • Plugin page: admin-menu-slide
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Jul 30, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: helium-3 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,650 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Admin Menu Slide
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.83 ▼1.84
Dashboard /wp-admin3.34 ▲0.0364.51 ▲9.24
Posts /wp-admin/edit.php3.39 ▲0.0347.98 ▼1.47
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.90 ▼5.93
Media Library /wp-admin/upload.php3.26 ▲0.0338.97 ▲1.10
Admin Menu Slide /wp-admin/options-general.php?page=admin-menu-slide3.2331.58

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
admin-menu-slide-settings
widget_recent-comments
admin-menu-slide-info
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Admin Menu Slide
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲9214.24 ▼0.021.89 ▲0.1843.30 ▼1.09
Dashboard /wp-admin2,234 ▲605.62 ▲0.0995.20 ▼7.1243.06 ▲0.26
Posts /wp-admin/edit.php2,139 ▲392.05 ▲0.0337.70 ▲2.4838.54 ▼0.22
Add New Post /wp-admin/post-new.php1,557 ▲3123.16 ▼0.02674.91 ▲63.5959.74 ▲7.39
Media Library /wp-admin/upload.php1,439 ▲364.22 ▲0.00110.33 ▲11.8745.15 ▲1.30
Admin Menu Slide /wp-admin/options-general.php?page=admin-menu-slide8742.0627.6530.28

Uninstaller [IO: ▲0.00MB] [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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/admin-menu-slide/includes/php/index.php
    • > /wp-content/plugins/admin-menu-slide/includes/index.php
    • > /wp-content/plugins/admin-menu-slide/includes/icons/index.php
    • > /wp-content/plugins/admin-menu-slide/includes/images/index.php
    • > /wp-content/plugins/admin-menu-slide/includes/js/index.php
    • > /wp-content/plugins/admin-menu-slide/includes/css/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/admin-menu-slide/settings.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% 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 need to be fixed:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

admin-menu-slide/index.php 92% from 13 tests

Analyzing the main PHP file in "Admin Menu Slide" version 1.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("admin-menu-slide.php" instead of "index.php")

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 plugin663 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP714671256
CSS2523208
SVG224100
JavaScript142999

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity19.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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.08MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/images/windowpress.png86.66KB27.76KB▼ 67.97%