83% demoondemand

Code Review | DemoOnDemand

WordPress plugin DemoOnDemand scored83%from 54 tests.

About plugin

  • Plugin page: demoondemand
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 16, 2018
  • Latest release: Apr 16, 2018
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: omedymwp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /716 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.66ms] Passed 4 tests

A check of server-side resources used by DemoOnDemand
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.46 ▼2.65
Dashboard /wp-admin3.33 ▲0.0350.34 ▲0.71
Posts /wp-admin/edit.php3.38 ▲0.0248.95 ▲1.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.02 ▼1.82
Media Library /wp-admin/upload.php3.25 ▲0.0236.44 ▲1.69

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

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

Browser metrics Passed 4 tests

DemoOnDemand: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲17213.43 ▼1.135.88 ▲4.0943.63 ▼1.34
Dashboard /wp-admin2,230 ▲395.86 ▲0.05103.63 ▼5.8377.85 ▲33.70
Posts /wp-admin/edit.php2,116 ▲271.98 ▼0.0737.95 ▼1.2933.52 ▼1.52
Add New Post /wp-admin/post-new.php1,532 ▼317.51 ▼5.53684.59 ▼6.9354.65 ▼5.62
Media Library /wp-admin/upload.php1,406 ▲184.12 ▼0.0599.64 ▲0.6774.31 ▲33.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/demoondemand/demo-on-demand.php:17

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 on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: video, demoondemand, omedym, demo

demoondemand/demo-on-demand.php 77% from 13 tests

The main file in "DemoOnDemand" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("")
  • Main file name: Name the main plugin file the same as the plugin slug ("demoondemand.php" instead of "demo-on-demand.php")
  • Domain Path: Please prefix the domain path with a forward slash character ("/")

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
Success! There were no dangerous files found in this plugin1,690 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22899921,449
PHP33327200
Markdown115029
CSS20612

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-without-text.png2.87KB1.73KB▼ 39.79%
images/logo.png8.11KB5.07KB▼ 37.50%