84% paj-divi-menu-options

Code Review | PAJ Divi Menu Options

WordPress plugin PAJ Divi Menu Options scored84%from 54 tests.

About plugin

  • Plugin page: paj-divi-menu-opt...
  • Plugin version: 0.93
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.2.3
  • WordPress version: 6.3.1
  • First release: Jan 9, 2018
  • Latest release: Oct 23, 2019
  • Number of updates: 10
  • Update frequency: every 65.3 days
  • Top authors: phillip2532 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,409 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.23ms] Passed 4 tests

An overview of server-side resources used by PAJ Divi Menu Options
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.11 ▼3.21
Dashboard /wp-admin3.31 ▲0.0152.19 ▼1.37
Posts /wp-admin/edit.php3.36 ▲0.0155.23 ▼0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.28 ▼12.02
Media Library /wp-admin/upload.php3.24 ▲0.0139.02 ▲3.00

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for PAJ Divi Menu Options
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲8213.36 ▼1.021.96 ▲0.0946.52 ▼2.11
Dashboard /wp-admin2,221 ▲154.85 ▼1.01113.63 ▲8.4849.43 ▲11.44
Posts /wp-admin/edit.php2,103 ▲32.06 ▲0.0042.94 ▲2.4339.57 ▲4.04
Add New Post /wp-admin/post-new.php1,543 ▼223.21 ▲0.15593.86 ▼24.5955.01 ▼5.15
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0199.40 ▼19.6946.48 ▼1.86

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/paj-divi-menu-options/paj-customizer/paj-customizer.php
    • > /wp-content/plugins/paj-divi-menu-options/paj-menu_divi_options.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 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
4 plugin tags: divi menu, customizer, divi, wordpress

paj-divi-menu-options/paj-menu_divi_options.php 92% from 13 tests

Analyzing the main PHP file in "PAJ Divi Menu Options" version 0.93
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("paj-divi-menu-options.php" instead of "paj-menu_divi_options.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 plugin645 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP284125415
JavaScript23135230

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin