84% seo-defend

Code Review | SEO Defend

WordPress plugin SEO Defend scored84%from 54 tests.

About plugin

  • Plugin page: seo-defend
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5
  • WordPress version: 6.3.1
  • First release: Aug 28, 2016
  • Latest release: Aug 3, 2020
  • Number of updates: 18
  • Update frequency: every 79.8 days
  • Top authors: seodefend (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /3,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.53ms] Passed 4 tests

This is a short check of server-side resources used by SEO Defend
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.67 ▼4.69
Dashboard /wp-admin3.29 ▼0.011,358.65 ▲1,307.16
Posts /wp-admin/edit.php3.39 ▲0.0349.11 ▲2.27
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.36 ▲3.19
Media Library /wp-admin/upload.php3.26 ▲0.0340.14 ▲5.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by SEO Defend
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲26513.58 ▼0.791.66 ▼0.0335.50 ▼12.46
Dashboard /wp-admin2,394 ▲2094.91 ▼0.9998.45 ▼16.3781.91 ▲35.66
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0341.38 ▲2.8735.95 ▲0.90
Add New Post /wp-admin/post-new.php1,543 ▲2418.07 ▼5.01639.31 ▼32.4450.72 ▲1.22
Media Library /wp-admin/upload.php1,391 ▲64.19 ▼0.0194.44 ▼15.9538.79 ▼13.08

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/seo-defend/seodefend.php:415

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (21 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

seo-defend/seodefend.php 92% from 13 tests

The primary PHP file in "SEO Defend" version 1.4 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("seo-defend.php" instead of "seodefend.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin330 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15631330

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions2
▷ Named functions2100.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
30 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/pies/purple/1.png3.32KB1.37KB▼ 58.63%
img/pies/purple/3.png3.68KB1.82KB▼ 50.64%
img/pies/grey/1.png3.32KB1.37KB▼ 58.63%
img/pies/grey/3.png3.66KB1.79KB▼ 51.01%
img/bars/lightpurple/2.png2.21KB0.99KB▼ 55.28%