89% schema-default-image

Code Review | Schema Default Image

WordPress plugin Schema Default Image scored89%from 54 tests.

About plugin

  • Plugin page: schema-default-image
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 19, 2016
  • Latest release: Nov 21, 2023
  • Number of updates: 41
  • Update frequency: every 63.2 days
  • Top authors: hishaman (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /21,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼4.36ms] Passed 4 tests

An overview of server-side resources used by Schema Default Image
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.57 ▼2.08
Dashboard /wp-admin3.32 ▼0.0348.46 ▼14.23
Posts /wp-admin/edit.php3.37 ▲0.0150.32 ▼0.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.76 ▲0.24
Media Library /wp-admin/upload.php3.24 ▲0.0035.91 ▼0.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Schema Default Image
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.54 ▲0.151.79 ▲0.1844.27 ▲2.82
Dashboard /wp-admin2,198 ▲215.63 ▲0.0984.42 ▼17.9236.90 ▼10.54
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0738.75 ▲2.8932.03 ▼1.48
Add New Post /wp-admin/post-new.php1,529 ▲323.34 ▼0.27589.58 ▼54.0045.36 ▼5.41
Media Library /wp-admin/upload.php1,400 ▼04.15 ▼0.0793.21 ▼5.2641.45 ▼3.11

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt is a good inspiration

schema-default-image/schema-default-image.php 77% from 13 tests

The principal PHP file in "Schema Default Image" v. 1.2.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • 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
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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
Success! There were no dangerous files found in this plugin82 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2549882

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods133.33%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
4 PNG files occupy 0.17MB with 0.09MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/banner-772x250.png11.63KB4.80KB▼ 58.72%
assets/images/screenshot-1.png148.09KB56.23KB▼ 62.03%
assets/images/icon-128x128.png4.71KB2.40KB▼ 49.06%
assets/images/icon-256x256.png8.72KB4.14KB▼ 52.47%