78% dummy-images

Code Review | Dummy Images

WordPress plugin Dummy Images scored78%from 54 tests.

About plugin

  • Plugin page: dummy-images
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2019
  • Latest release: Feb 16, 2023
  • Number of updates: 6
  • Update frequency: every 245.8 days
  • Top authors: mbelchev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,926 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.17ms] Passed 4 tests

A check of server-side resources used by Dummy Images
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.24 ▼0.79
Dashboard /wp-admin3.40 ▲0.0953.75 ▲3.10
Posts /wp-admin/edit.php3.51 ▲0.1552.02 ▼1.03
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.36 ▼5.94
Media Library /wp-admin/upload.php3.32 ▲0.0944.17 ▲3.95
Dummy Images /wp-admin/upload.php?page=dummy-images3.2935.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Dummy Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▲0.091.80 ▲0.2442.39 ▼0.40
Dashboard /wp-admin2,202 ▲255.61 ▼0.0694.32 ▲3.7942.57 ▲4.96
Posts /wp-admin/edit.php2,104 ▲41.98 ▼0.1435.57 ▲1.2734.11 ▼2.68
Add New Post /wp-admin/post-new.php1,541 ▲222.93 ▲4.81645.27 ▲2.6152.43 ▼16.84
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.11110.40 ▲1.4145.68 ▼2.42
Dummy Images /wp-admin/upload.php?page=dummy-images1,1502.6555.1329.10

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dummy-images/dummy-images.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/dummy-images/views/media.php:2

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 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #2, #3 in dummy-images/assets to your readme.txt
The official readme.txt is a good inspiration

dummy-images/dummy-images.php 92% from 13 tests

The main PHP script in "Dummy Images" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 158 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin437 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP47815312
JavaScript218062
Sass18062
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.50
▷ Minimum class complexity13.00
▷ Maximum class complexity18.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods1041.67%
▷ Protected methods00.00%
▷ Private methods1458.33%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
There are no PNG files in this plugin