72% on-page-and-post-seo

Code Review | On-Page and Post SEO

WordPress plugin On-Page and Post SEO scored72%from 54 tests.

About plugin

  • Plugin page: on-page-and-post-seo
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 11, 2016
  • Latest release: Feb 17, 2016
  • Number of updates: 7
  • Update frequency: every 43.9 days
  • Top authors: repupress (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,217 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.98ms] Passed 4 tests

An overview of server-side resources used by On-Page and Post SEO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.25 ▲6.18
Dashboard /wp-admin3.42 ▲0.0849.86 ▼18.27
Posts /wp-admin/edit.php3.47 ▲0.1144.91 ▼6.80
Add New Post /wp-admin/post-new.php5.98 ▲0.0999.19 ▼8.82
Media Library /wp-admin/upload.php3.28 ▲0.0542.17 ▲5.98
SEO Check /wp-admin/admin.php?page=wtb_seo_settings3.2232.32
OnPage Post SEO /wp-admin/admin.php?page=onpage-post-seo-settings3.2933.75
SEO Premium /wp-admin/admin.php?page=onpage-post-seo-premium3.2734.37
Keyword Tool /wp-admin/admin.php?page=wp_keyword_tools_settings3.2633.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by On-Page and Post SEO
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.69 ▼0.711.68 ▲0.0741.23 ▼2.41
Dashboard /wp-admin2,327 ▲1265.91 ▲1.00104.16 ▼10.0375.26 ▲32.90
Posts /wp-admin/edit.php2,137 ▲372.02 ▲0.0138.17 ▲2.6937.21 ▲0.65
Add New Post /wp-admin/post-new.php6,675 ▲5,14428.96 ▲5.97979.66 ▲307.0492.82 ▲33.80
Media Library /wp-admin/upload.php1,440 ▲404.23 ▲0.02109.09 ▲6.6651.66 ▲6.71
SEO Check /wp-admin/admin.php?page=wtb_seo_settings1,0982.0623.2934.95
OnPage Post SEO /wp-admin/admin.php?page=onpage-post-seo-settings8812.1827.3542.84
SEO Premium /wp-admin/admin.php?page=onpage-post-seo-premium8272.2223.5427.70
Keyword Tool /wp-admin/admin.php?page=wp_keyword_tools_settings2,3842.1429.0442.36

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=wtb_seo_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=wtb_seo_settings
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/on-page-and-post-seo/onpage-post-seo-premium-options.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/on-page-and-post-seo/widget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/on-page-and-post-seo/views/general.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/on-page-and-post-seo/views/box_header.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/on-page-and-post-seo/onpage-post-primary-options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/on-page-and-post-seo/views/section.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/on-page-and-post-seo/ptranslation.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/on-page-and-post-seo/wp-onpage-post-seo.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/on-page-and-post-seo/wp_keyword_ajax.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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: The official readme.txt is a good inspiration

on-page-and-post-seo/wp-onpage-post-seo.php 85% from 13 tests

Analyzing the main PHP file in "On-Page and Post SEO" version 1.0
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 188 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("on-page-and-post-seo.php" instead of "wp-onpage-post-seo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin72 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP193053
CSS6006
JavaScript6015
INI2004
XML4004
PO File2020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity51.40
▷ Minimum class complexity2.00
▷ Maximum class complexity197.00
Average method complexity4.34
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods151
▷ Static methods42.65%
▷ Public methods12079.47%
▷ Protected methods2617.22%
▷ Private methods53.31%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
25 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png28.86KB11.58KB▼ 59.86%
images/widget/help.png7.43KB3.13KB▼ 57.85%
assets/icon-128x128.png12.47KB5.15KB▼ 58.69%
img/keyword-suggestion-tool-list.png10.96KB5.32KB▼ 51.41%
assets/img/refresh.png1.19KB0.46KB▼ 61.36%