77% dom-seo-image

Code Review | DOM SEO Image

WordPress plugin DOM SEO Image scored77%from 54 tests.

About plugin

  • Plugin page: dom-seo-image
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.3.1
  • WordPress version: 6.3.1
  • First release: Dec 24, 2015
  • Latest release: Jan 21, 2016
  • Number of updates: 6
  • Update frequency: every 4.7 days
  • Top authors: Joao_Pedro_Alves (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /2,603 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
Installer ran successfully

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

A check of server-side resources used by DOM SEO Image
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.22 ▼0.29
Dashboard /wp-admin3.35 ▲0.0549.34 ▼5.16
Posts /wp-admin/edit.php3.46 ▲0.1149.29 ▼0.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.84 ▲0.73
Media Library /wp-admin/upload.php3.27 ▲0.0435.31 ▼1.22
About /wp-admin/admin.php?page=dom_about3.2434.06
Settings /wp-admin/admin.php?page=dom_settings3.2530.26

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for DOM SEO Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.59 ▼0.791.78 ▼0.3341.88 ▼4.17
Dashboard /wp-admin2,236 ▲485.91 ▲1.01101.00 ▼3.4740.02 ▼1.93
Posts /wp-admin/edit.php2,119 ▲272.04 ▲0.0440.81 ▼3.1034.43 ▼3.12
Add New Post /wp-admin/post-new.php1,555 ▲1323.40 ▲5.13659.98 ▲10.7855.12 ▲7.43
Media Library /wp-admin/upload.php1,409 ▲214.19 ▲0.0399.31 ▼5.0144.07 ▼4.04
About /wp-admin/admin.php?page=dom_about8172.0228.8527.89
Settings /wp-admin/admin.php?page=dom_settings1,2262.0223.9626.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=dom_settings
    • > Notice in wp-content/plugins/dom-seo-image/html/settings.php+38
    Undefined variable: data
    • > GET request to /wp-admin/admin.php?page=dom_settings
    • > Notice in wp-content/plugins/dom-seo-image/html/settings.php+38
    Trying to access array offset on value of type null

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 items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/dom-seo-image/html/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dom-seo-image/wp-seo-dom-main.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/dom-seo-image/html/about.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === dom-seo-image === )
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

dom-seo-image/wp-seo-dom.php 85% from 13 tests

The principal PHP file in "DOM SEO Image" v. 1.0.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 198 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("dom-seo-image.php" instead of "wp-seo-dom.php")

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 plugin416 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55319284
PO File23441132

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods422.22%
▷ Public methods1794.44%
▷ Protected methods00.00%
▷ Private methods15.56%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin