84% pyxis-mobile-menu

Code Review | Pyxis - Responsive, Mobile-Friendly Menu

WordPress plugin Pyxis - Responsive, Mobile-Friendly Menu scored84%from 54 tests.

About plugin

  • Plugin page: pyxis-mobile-menu
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0.0
  • WordPress version: 6.3.1
  • First release: Aug 11, 2020
  • Latest release: Jun 11, 2022
  • Number of updates: 6
  • Update frequency: every 111.7 days
  • Top authors: presscargo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /956 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.78MB] [CPU: ▲0.28ms] Passed 4 tests

Server-side resources used by Pyxis - Responsive, Mobile-Friendly Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5149.26 ▲4.27
Dashboard /wp-admin4.22 ▲0.9254.62 ▲5.56
Posts /wp-admin/edit.php4.24 ▲0.8955.73 ▼0.09
Add New Post /wp-admin/post-new.php6.74 ▲0.8691.71 ▼8.61
Media Library /wp-admin/upload.php4.08 ▲0.8552.42 ▲16.75
Pyxis Mobile Menu /wp-admin/options-general.php?page=pyxis_plugin_options4.4344.95

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 387 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Pyxis - Responsive, Mobile-Friendly Menu
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19513.74 ▼0.406.43 ▲4.5750.97 ▲6.45
Dashboard /wp-admin2,218 ▲305.08 ▼0.82108.70 ▲2.8341.23 ▲1.66
Posts /wp-admin/edit.php2,104 ▲152.10 ▲0.1137.32 ▼2.7134.24 ▼0.46
Add New Post /wp-admin/post-new.php1,524 ▼923.53 ▲0.43654.29 ▼1.9455.73 ▲4.41
Media Library /wp-admin/upload.php1,400 ▲154.33 ▲0.11107.39 ▲7.0744.36 ▲1.97
Pyxis Mobile Menu /wp-admin/options-general.php?page=pyxis_plugin_options9611.7726.3329.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Picker_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_nav_menu() in wp-content/plugins/pyxis-mobile-menu/templates/menu.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pyxis-mobile-menu/inc/functions.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Taxonomy_Select.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_File_List.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Counter_Base' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Text.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/pyxis-mobile-menu/vendor/CMB2/includes/types/CMB2_Type_Colorpicker.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: navigation, tablet menu, mobile, off-canvas, hamburger menu...

pyxis-mobile-menu/pyxis-mobile-menu.php Passed 13 tests

Analyzing the main PHP file in "Pyxis - Responsive, Mobile-Friendly Menu" version 1.1.3
49 characters long description:
A responsive mobile menu for your WordPress site.

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
Everything looks great! No dangerous files found in this plugin56,025 lines of code in 240 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP712,4907,1458,488
JSON2006,602
CSS152581,1964,832
JavaScript124215881,657
Sass17306291,411
Markdown22300711
SVG1001

PHP code Passed 2 tests

This is a very shot 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.45
Average class complexity17.99
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes76
▷ Abstract classes911.84%
▷ Concrete classes6788.16%
▷ Final classes68.96%
Methods605
▷ Static methods11118.35%
▷ Public methods50483.31%
▷ Protected methods8914.71%
▷ Private methods121.98%
Functions55
▷ Named functions4989.09%
▷ Anonymous functions610.91%
Constants16
▷ Global constants1062.50%
▷ Class constants637.50%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/CMB2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/CMB2/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
vendor/CMB2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/CMB2/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
vendor/CMB2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%