10% dop-shortcodes

Code Review | DOP Shortcodes

WordPress plugin DOP Shortcodes scored10%from 54 tests.

About plugin

  • Plugin page: dop-shortcodes
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2013
  • Latest release: Oct 3, 2013
  • Number of updates: 17
  • Update frequency: every 4.5 days
  • Top authors: DOTonPAPER (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /4,116 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/dop-shortcodes/dopshortcodes-frontend.php+16
    Methods with the same name as their class will not be constructors in a future version of PHP; DOPShortcodesFrontEnd has a deprecated constructor

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

Server-side resources used by DOP Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.37 ▼2.57
Dashboard /wp-admin3.31 ▲0.0042.42 ▼4.61
Posts /wp-admin/edit.php3.42 ▲0.0744.63 ▼1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.88 ▼19.94
Media Library /wp-admin/upload.php3.23 ▲0.0030.01 ▼4.79

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DOP Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲15913.68 ▼0.615.57 ▲3.9039.60 ▲1.32
Dashboard /wp-admin2,206 ▲185.79 ▼0.10100.18 ▲0.3138.04 ▼3.48
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.1139.37 ▲1.8235.43 ▼2.74
Add New Post /wp-admin/post-new.php1,525 ▼1023.43 ▼0.01578.11 ▼97.5650.32 ▼3.63
Media Library /wp-admin/upload.php1,388 ▲34.26 ▲0.0694.75 ▼16.8841.44 ▼4.70

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/dop-shortcodes/dopshortcodes.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: You should set the name of your plugin on the first line ( === dop-shortcodes === )
You can take inspiration from this readme.txt

dop-shortcodes/dopshortcodes.php 85% from 13 tests

"DOP Shortcodes" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dop-shortcodes.php" instead of "dopshortcodes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin3,978 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
SVG3001,862
CSS3102781,058
JavaScript18611648
PHP28250410

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity69.00
▷ Minimum class complexity69.00
▷ Maximum class complexity69.00
Average method complexity4.58
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
5 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/gui/images/list-arrows.png2.87KB0.21KB▼ 92.83%
assets/gui/images/list-diamonds.png2.85KB0.21KB▼ 92.82%
assets/gui/images/list-checks.png2.94KB0.34KB▼ 88.59%
assets/gui/images/list-circles.png2.87KB0.18KB▼ 93.61%
assets/gui/images/dopil-no-image.png3.31KB0.53KB▼ 83.94%