10% seo-enforcer

Code Review | SEO Enforcer

WordPress plugin SEO Enforcer scored10%from 54 tests.

About plugin

  • Plugin page: seo-enforcer
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.2
  • WordPress version: 6.3.1
  • First release: Feb 5, 2015
  • Latest release: Dec 14, 2016
  • Number of updates: 45
  • Update frequency: every 16.1 days
  • Top authors: mainehost (86.67%)godthor (15.56%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /6,565 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User error in wp-content/plugins/seo-enforcer/seoe.php+212
    Yoast SEO is not installed or active. SEO Enforcer will not function until Yoast SEO is installed and activated.

Server metrics [RAM: ▼0.70MB] [CPU: ▼19.59ms] Passed 4 tests

This is a short check of server-side resources used by SEO Enforcer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.83 ▼0.58
Dashboard /wp-admin3.32 ▲0.0247.71 ▼5.06
Posts /wp-admin/edit.php3.43 ▲0.0851.18 ▲1.25
Add New Post /wp-admin/post-new.php3.05 ▼2.8424.81 ▼73.95
Media Library /wp-admin/upload.php3.24 ▲0.0141.21 ▲6.52
SEO Enforcer /wp-admin/options-general.php?page=seo-enforcer3.2729.84

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
seoe_settings_version
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by SEO Enforcer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.30 ▼0.071.98 ▼0.0245.12 ▲1.77
Dashboard /wp-admin2,199 ▲195.65 ▼0.0392.25 ▲6.5242.67 ▲1.31
Posts /wp-admin/edit.php2,107 ▲101.97 ▼0.0340.49 ▲1.9437.76 ▲3.17
Add New Post /wp-admin/post-new.php1,551 ▼723.22 ▲4.79659.80 ▲35.2153.89 ▼7.05
Media Library /wp-admin/upload.php1,407 ▲104.21 ▼0.12106.72 ▼4.4747.94 ▲0.46
SEO Enforcer /wp-admin/options-general.php?page=seo-enforcer1,0422.0732.9537.17

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • seoe_settings_version
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Warning in wp-content/plugins/seo-enforcer/seoe_admin.php+13
    extract() expects parameter 1 to be array, bool given
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+64
    Undefined variable: seoe_post_notices
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+76
    Undefined variable: seoe_title
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+83
    Undefined variable: seoe_title_length
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+90
    Undefined variable: seoe_title_trunc_type
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+96
    Undefined variable: seoe_title_trunc_ex
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+106
    Undefined variable: seoe_desc
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+113
    Undefined variable: seoe_desc_length
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+120
    Undefined variable: seoe_desc_trunc_type
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+126
    Undefined variable: seoe_desc_trunc_ex
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+137
    Undefined variable: seoe_h1
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+144
    Undefined variable: seoe_h1_ex
    • > GET request to /wp-admin/options-general.php?page=seo-enforcer
    • > Notice in wp-content/plugins/seo-enforcer/seoe_admin.php+154
    Undefined variable: seoe_img

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/seo-enforcer/seoe.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/seo-enforcer/seoe_admin.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: wordpress seo, seo

seo-enforcer/seoe.php 92% from 13 tests

The principal PHP file in "SEO Enforcer" v. 1.3.6 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("seo-enforcer.php" instead of "seoe.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected536 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28187462
JavaScript16074

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity43.50
▷ Minimum class complexity17.00
▷ Maximum class complexity70.00
Average method complexity5.25
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/shopp_seo.png34.53KB13.77KB▼ 60.13%