84% lazyest-gallery-hide-menu

Code Review | Lazyest Gallery Hide Menu

WordPress plugin Lazyest Gallery Hide Menu scored84%from 54 tests.

About plugin

  • Plugin page: lazyest-gallery-h...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.6
  • WordPress version: 6.3.1
  • First release: Sep 10, 2013
  • Latest release: Aug 30, 2020
  • Number of updates: 17
  • Update frequency: every 149.8 days
  • Top authors: isabel104 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,222 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.87ms] Passed 4 tests

Analyzing server-side resources used by Lazyest Gallery Hide Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.50 ▼0.09
Dashboard /wp-admin3.31 ▲0.0147.78 ▼4.74
Posts /wp-admin/edit.php3.36 ▲0.0050.95 ▲3.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.77 ▼10.00
Media Library /wp-admin/upload.php3.23 ▲0.0035.54 ▼0.63

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Lazyest Gallery Hide Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.25 ▼1.341.72 ▼0.3443.28 ▼9.69
Dashboard /wp-admin2,203 ▲155.79 ▲0.9598.66 ▼5.4040.24 ▼0.39
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0140.91 ▲6.1034.78 ▲3.05
Add New Post /wp-admin/post-new.php1,535 ▲1323.28 ▲0.05694.41 ▲38.2955.71 ▲0.02
Media Library /wp-admin/upload.php1,385 ▼34.21 ▲0.0199.45 ▼1.4039.28 ▼3.84

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lazyest-gallery-hide-menu/lazyest-gallery-hide-menu.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: menu, admin menu, hide menu, lazyest gallery

lazyest-gallery-hide-menu/lazyest-gallery-hide-menu.php Passed 13 tests

The entry point to "Lazyest Gallery Hide Menu" version 1.2.2 is a PHP file that has certain tags in its header comment area
115 characters long description:
Hide the Lazyest Gallery admin menu item from all users except administrators. Avoids users deleting your pictures.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16217

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin