90% preview-menu

Code Review | Preview Menu

WordPress plugin Preview Menu scored90%from 54 tests.

About plugin

  • Plugin page: preview-menu
  • Plugin version: 0.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8
  • WordPress version: 6.3.1
  • First release: Dec 5, 2018
  • Latest release: Oct 13, 2021
  • Number of updates: 8
  • Update frequency: every 131.0 days
  • Top authors: keraweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /742 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by Preview Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.42 ▼0.50
Dashboard /wp-admin3.32 ▼0.0350.61 ▼14.92
Posts /wp-admin/edit.php3.37 ▲0.0154.63 ▼0.83
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.99 ▼11.75
Media Library /wp-admin/upload.php3.25 ▲0.0139.43 ▼0.51

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Preview Menu
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.334.45 ▲2.5243.53 ▼0.30
Dashboard /wp-admin2,203 ▲155.81 ▲0.9298.07 ▼16.8739.44 ▼0.28
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0234.13 ▼6.6730.17 ▼6.44
Add New Post /wp-admin/post-new.php1,542 ▲2818.71 ▲1.23660.27 ▲35.4672.55 ▲14.78
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.1397.36 ▼2.8243.90 ▼2.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: preview menu, preview, menu

preview-menu/preview-menu.php 92% from 13 tests

The main file in "Preview Menu" v. 0.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages/")

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
Good job! No executable or dangerous file extensions detected100 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13098100

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin