84% dobsondev-shortcodes

Code Review | DobsonDev Shortcodes

WordPress plugin DobsonDev Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: dobsondev-shortcodes
  • Plugin version: 2.1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-5.4.1
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: May 6, 2020
  • Number of updates: 77
  • Update frequency: every 29.6 days
  • Top authors: DobsonDev (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /15,775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼4.20ms] Passed 4 tests

Analyzing server-side resources used by DobsonDev Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2745.22 ▲3.92
Dashboard /wp-admin3.63 ▲0.3351.76 ▼5.48
Posts /wp-admin/edit.php3.69 ▲0.3350.55 ▲1.24
Add New Post /wp-admin/post-new.php6.17 ▲0.2986.16 ▼16.48
Media Library /wp-admin/upload.php3.49 ▲0.2745.01 ▲4.95

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

DobsonDev Shortcodes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.61 ▼0.427.08 ▲4.7441.79 ▼5.48
Dashboard /wp-admin2,226 ▲265.81 ▲0.93101.33 ▼7.2340.97 ▼1.35
Posts /wp-admin/edit.php2,108 ▲82.06 ▲0.0137.22 ▼2.1936.11 ▼3.40
Add New Post /wp-admin/post-new.php1,534 ▲323.35 ▲0.23622.93 ▼66.2660.84 ▼16.05
Media Library /wp-admin/upload.php1,411 ▲144.26 ▲0.02112.84 ▼4.0748.09 ▼5.46

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 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 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dobsondev-shortcodes/dobsondev-shortcodes.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 43 tag instead of maximum 10
You can look at the official readme.txt

dobsondev-shortcodes/dobsondev-shortcodes.php Passed 13 tests

The entry point to "DobsonDev Shortcodes" version 2.1.12 is a PHP file that has certain tags in its header comment area
35 characters long description:
A collection of helpful shortcodes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,598 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP24883931,803
JavaScript4629574
CSS205221

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity217.00
▷ Minimum class complexity217.00
▷ Maximum class complexity217.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods61
▷ Static methods46.56%
▷ Public methods914.75%
▷ Protected methods5285.25%
▷ Private methods00.00%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
res/imgs/dd-shortcodes.png0.76KB0.74KB▼ 3.32%