94% gt-push-menu-lite

Code Review | GT Push Menu Lite

WordPress plugin GT Push Menu Lite scored 94% from 54 tests.

About plugin

  • Plugin page: gt-push-menu-lite
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.9
  • WordPress version: 5.8.1
  • First release: Mar 30, 2014
  • Latest release: Jul 1, 2014
  • Number of updates: 9
  • Update frequency: every 10.3 days
  • Top authors: Neocoder (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active / 3,177 total downloads

Benchmarks

Plugin footprint Passed 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.30MB] [CPU: ▼133.18ms] Passed 4 tests

Analyzing server-side resources used by GT Push Menu Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.10 ▲0.3847.78 ▲24.41
Dashboard /wp-admin3.39 ▲0.3450.31 ▲9.37
Posts /wp-admin/edit.php3.44 ▲0.3345.53 ▲1.39
Add New Post /wp-admin/post-new.php5.70 ▲0.2797.53 ▼539.46
Media Library /wp-admin/upload.php3.27 ▲0.2636.00 ▼4.03

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 1 new option
New WordPress options
gtpm_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for GT Push Menu Lite
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,697 ▲10115.99 ▲0.1511.58 ▲0.2575.35 ▲28.34
Dashboard /wp-admin2,987 ▲536.25 ▲0.31152.54 ▲6.27121.63 ▲3.25
Posts /wp-admin/edit.php2,753 ▲142.74 ▲0.0470.98 ▲2.6497.27 ▲4.79
Add New Post /wp-admin/post-new.php1,626 ▲12821.60 ▲2.72277.34 ▼102.81109.77 ▲3.01
Media Library /wp-admin/upload.php1,819 ▲95.11 ▲0.11159.96 ▲6.50121.31 ▼3.50

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/gt-push-menu-lite/views/_header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/gt-push-menu-lite/views/_header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gt-push-menu-lite/gt-push-menu.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gt-push-menu-lite/core.php:17

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

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Mailbox.), #2 (Template editor.), #3 (Subscriber management.)
Please take inspiration from this readme.txt

gt-push-menu-lite/gt-push-menu.php 92% from 13 tests

The primary PHP file in "GT Push Menu Lite" version 1.2.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gt-push-menu-lite.php" instead of "gt-push-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin23,408 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS121,28416710,688
JavaScript152,4161,58610,647
PHP93895931,383
SVG200386
HTML1469244
Markdown146060

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity47.00
▷ Minimum class complexity22.00
▷ Maximum class complexity107.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods97
▷ Static methods1515.46%
▷ Public methods8486.60%
▷ Protected methods22.06%
▷ Private methods1111.34%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants20
▷ Global constants1155.00%
▷ Class constants945.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
44 compressed PNG files occupy 0.63MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/colorpicker/colorpicker_rgb_g.png1.04KB0.83KB▼ 20.21%
img/colorpicker/custom_submit.png0.97KB0.99KB0.00%
img/colorpicker/colorpicker_overlay.png10.11KB8.24KB▼ 18.50%
docs/assets/img/glyphicons/glyphicons_009_magic.png0.31KB0.32KB0.00%
img/colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%