90% wp-moody-shortcodes

Code Review | Moody Shortcodes

WordPress plugin Moody Shortcodes scored 90% from 54 tests.

About plugin

  • Plugin page: wp-moody-shortcodes
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.7
  • WordPress version: 6.3.1
  • First release: Dec 2, 2013
  • Latest release: Dec 2, 2013
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: alex-ye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Moody Shortcodes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.99 ▼4.72
Dashboard /wp-admin3.31 ▲0.0145.87 ▼6.30
Posts /wp-admin/edit.php3.37 ▲0.0147.48 ▼7.82
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.07 ▼5.96
Media Library /wp-admin/upload.php3.24 ▲0.0136.79 ▲0.62

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Moody Shortcodes
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.271.80 ▼0.1543.14 ▼1.68
Dashboard /wp-admin2,206 ▲185.83 ▲0.96100.30 ▼16.1936.30 ▼8.77
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.1137.27 ▲0.2833.42 ▲2.43
Add New Post /wp-admin/post-new.php1,542 ▲923.03 ▼0.26649.51 ▼53.2759.55 ▲2.99
Media Library /wp-admin/upload.php1,382 ▼94.27 ▲0.0596.50 ▼1.6839.40 ▼6.19

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: shortcode, moody shortcodes, conditional tags, shortcodes, api

wp-moody-shortcodes/main.php 92% from 13 tests

The principal PHP file in "Moody Shortcodes" v. 0.1 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-moody-shortcodes.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin68 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2447368

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods787.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

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