90% dco-shortcodes-menu

Code Review | DCO Shortcodes Menu

WordPress plugin DCO Shortcodes Menu scored90%from 54 tests.

About plugin

  • Plugin page: dco-shortcodes-menu
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Feb 6, 2016
  • Latest release: Jan 19, 2018
  • Number of updates: 10
  • Update frequency: every 71.5 days
  • Top authors: denisco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,456 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.69ms] Passed 4 tests

This is a short check of server-side resources used by DCO Shortcodes Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.79 ▼3.61
Dashboard /wp-admin3.37 ▲0.0651.20 ▲2.69
Posts /wp-admin/edit.php3.43 ▲0.0752.14 ▼1.45
Add New Post /wp-admin/post-new.php6.07 ▲0.1888.87 ▼8.37
Media Library /wp-admin/upload.php3.30 ▲0.0640.17 ▲3.87
DCO Shortcodes Menu /wp-admin/edit.php?post_type=dco_shortcode3.3438.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

DCO Shortcodes Menu: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.28 ▼0.071.74 ▼0.1644.65 ▲2.82
Dashboard /wp-admin2,202 ▲225.62 ▲0.0086.81 ▼4.8339.38 ▼3.70
Posts /wp-admin/edit.php2,104 ▲41.95 ▼0.0635.96 ▼7.0132.69 ▼2.79
Add New Post /wp-admin/post-new.php1,533 ▲722.95 ▼0.56691.40 ▼8.2235.78 ▼20.50
Media Library /wp-admin/upload.php1,404 ▲44.21 ▲0.06100.50 ▼0.2842.12 ▼2.96
DCO Shortcodes Menu /wp-admin/edit.php?post_type=dco_shortcode1,1061.9132.5030.79

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
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: editor, shortcodes menu, insert shortcode, tinymce, shortcode

dco-shortcodes-menu/dco-shortcodes-menu.php Passed 13 tests

The main file in "DCO Shortcodes Menu" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
47 characters long description:
Allows you to add shortcodes menu to the editor

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 plugin955 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP913414752
JavaScript2106169
Sass15021
CSS14113

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.75
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods52
▷ Static methods00.00%
▷ Public methods52100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected