89% default-image-settings

Code Review | Default Image Settings

WordPress plugin Default Image Settings scored89%from 54 tests.

About plugin

  • Plugin page: default-image-set...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Jul 1, 2014
  • Latest release: Nov 29, 2016
  • Number of updates: 10
  • Update frequency: every 88.4 days
  • Top authors: engelen (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /4,185 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

An overview of server-side resources used by Default Image Settings
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0052.51 ▲7.09
Dashboard /wp-admin3.31 ▲0.0152.94 ▲2.06
Posts /wp-admin/edit.php3.36 ▲0.0149.90 ▲2.30
Add New Post /wp-admin/post-new.php5.89 ▲0.01101.17 ▼6.17
Media Library /wp-admin/upload.php3.24 ▲0.0134.43 ▼5.87

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Default Image Settings
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.38 ▼0.001.74 ▼0.0844.92 ▲5.77
Dashboard /wp-admin2,195 ▲155.63 ▼0.0295.36 ▲5.4844.44 ▲0.61
Posts /wp-admin/edit.php2,100 ▼02.05 ▼0.0136.82 ▲0.9734.61 ▲1.38
Add New Post /wp-admin/post-new.php1,542 ▼518.32 ▼4.87658.29 ▼49.5952.46 ▼5.28
Media Library /wp-admin/upload.php1,400 ▼34.19 ▼0.0597.46 ▼9.9644.51 ▼2.74

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === default-image-settings === )
Please take inspiration from this readme.txt

default-image-settings/default-image-settings.php 92% from 13 tests

The main PHP script in "Default Image Settings" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin116 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP236106116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.50
▷ Minimum class complexity3.00
▷ Maximum class complexity12.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin