78% image-config-defaults

Code Review | Image Config Default

WordPress plugin Image Config Default scored78%from 54 tests.

About plugin

  • Plugin page: image-config-defa...
  • Plugin version: 1.2.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 9, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 13
  • Update frequency: every 75.9 days
  • Top authors: benediktbergmann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /611 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.10MB] [CPU: ▼11.84ms] Passed 4 tests

This is a short check of server-side resources used by Image Config Default
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0133.93 ▼9.47
Dashboard /wp-admin3.32 ▲0.0143.51 ▼8.46
Posts /wp-admin/edit.php3.37 ▲0.0148.49 ▼0.58
Add New Post /wp-admin/post-new.php5.45 ▼0.4464.02 ▼28.84
Media Library /wp-admin/upload.php3.24 ▲0.0133.99 ▲0.10
Image Config Default /wp-admin/options-general.php?page=imageConfigDefaults3.1824.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Image Config Default
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.30 ▼1.061.53 ▼0.1439.27 ▼8.77
Dashboard /wp-admin2,207 ▲164.88 ▼0.01113.89 ▲0.5542.42 ▼7.26
Posts /wp-admin/edit.php2,093 ▲42.16 ▲0.1735.00 ▼4.9530.11 ▼3.01
Add New Post /wp-admin/post-new.php1,520 ▼017.65 ▼5.41684.41 ▲23.2353.94 ▼4.52
Media Library /wp-admin/upload.php1,389 ▲14.29 ▲0.0896.64 ▼1.9243.49 ▼2.41
Image Config Default /wp-admin/options-general.php?page=imageConfigDefaults8432.0327.1628.66

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=imageConfigDefaults
    • > Notice in wp-content/plugins/image-config-defaults/image-config-defaults.php+119
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/image-config-defaults/image-config-defaults.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: default, image, gutenberg, config

image-config-defaults/image-config-defaults.php 85% from 13 tests

"Image Config Default" version 1.2.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected131 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11815131

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected