78% wp-onpage-seo

Code Review | WordPress On Page SEO

WordPress plugin WordPress On Page SEO scored78%from 54 tests.

About plugin

  • Plugin page: wp-onpage-seo
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: Mar 25, 2015
  • Latest release: Aug 18, 2021
  • Number of updates: 52
  • Update frequency: every 45.0 days
  • Top authors: mag_oberon (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /26,295 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▲9.82ms] Passed 4 tests

Analyzing server-side resources used by WordPress On Page SEO
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.22 ▲3.95
Dashboard /wp-admin3.51 ▲0.2068.12 ▲20.46
Posts /wp-admin/edit.php3.56 ▲0.2078.60 ▲28.78
Add New Post /wp-admin/post-new.php5.91 ▲0.0396.96 ▲12.11
Media Library /wp-admin/upload.php3.34 ▲0.1237.68 ▲2.74
Options /wp-admin/admin.php?page=OnPageSeo-options3.7464.82
Admin /wp-admin/admin.php?page=OnPageSeo3.3164.39

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 158 new files
Database: no new tables, 13 new options
New WordPress options
can_compress_scripts
widget_recent-posts
ops_announcement_cache
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
ops_orderby
widget_recent-comments
ops_posts_per_page
ops_post_type
...

Browser metrics Passed 4 tests

WordPress On Page SEO: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.56 ▼1.111.75 ▲0.0437.58 ▼6.21
Dashboard /wp-admin2,220 ▲295.85 ▼0.03108.09 ▲2.9475.59 ▲32.82
Posts /wp-admin/edit.php2,115 ▲261.98 ▲0.0136.77 ▼3.2935.69 ▼2.41
Add New Post /wp-admin/post-new.php6,893 ▲5,37019.07 ▼4.27976.49 ▲308.2356.65 ▲0.81
Media Library /wp-admin/upload.php1,411 ▲204.11 ▼0.1297.08 ▼6.1371.08 ▲26.26
Options /wp-admin/admin.php?page=OnPageSeo-options1,7791.8931.1436.06
Admin /wp-admin/admin.php?page=OnPageSeo1,8271.7825.2740.49

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
These items require your attention
  • The uninstall procedure has failed, leaving 13 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • ops_posts_per_page
    • db_upgraded
    • can_compress_scripts
    • ops_extra_content_mode-mass
    • ops_order
    • ops_factors
    • ops_post_type
    • widget_recent-comments
    • ...

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/application/views/Engine.php+176
    Undefined index: messages
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/application/views/Engine.php+176
    Undefined index: hideHeaderTabs
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/application/views/Engine.php+176
    Undefined index: headerTabs
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/on_page_seo.php+581
    Undefined index: controller
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/on_page_seo.php+583
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/application/views/Engine.php+176
    Undefined index: command
    • > GET request to /wp-admin/admin.php?page=OnPageSeo
    • > Notice in wp-content/plugins/wp-onpage-seo/application/views/Engine.php+145
    Undefined index: LimitStringLength

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 take a closer look at the following
  • 238× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(OPS_APPLICATION_PATH/services/Optimization/Helper/Abstract/Base.php): failed to open stream: No such file or directory in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Helper/AddMetaTag.php on line 3
    • > PHP Warning
      Use of undefined constant OPS_APPLICATION_PATH - assumed 'OPS_APPLICATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-onpage-seo/application/forms/Metabox.php on line 2
    • > PHP Warning
      require_once(OPS_APPLICATION_PATH/services/Optimization/Helper/Abstract/Base.php): failed to open stream: No such file or directory in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Helper/PrepareForUri.php on line 2
    • > PHP Warning
      require_once(OPS_APPLICATION_PATH/forms/Admin.php): failed to open stream: No such file or directory in wp-content/plugins/wp-onpage-seo/application/forms/Admin/Navigation.php on line 2
    • > PHP Warning
      Use of undefined constant OPS_APPLICATION_PATH - assumed 'OPS_APPLICATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Filter/MetaDescription.php on line 2
    • > PHP Warning
      Use of undefined constant OPS_APPLICATION_PATH - assumed 'OPS_APPLICATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Filter/MetaKeywords.php on line 2
    • > PHP Warning
      Use of undefined constant OPS_APPLICATION_PATH - assumed 'OPS_APPLICATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Factor/MetaKeywords.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'OPS_APPLICATION_PATH/services/Optimization/Analyzer/Abstract/Base.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Analyzer/KeywordInEveryPattern.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'OPS_APPLICATION_PATH/services/Optimization/Helper/Abstract/Base.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Helper/NormalizeWhitespace.php on line 2
    • > PHP Warning
      Use of undefined constant OPS_APPLICATION_PATH - assumed 'OPS_APPLICATION_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-onpage-seo/application/services/Optimization/Helper/Strings.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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 require attention:
  • Tags: You are using too many tags: 26 tag instead of maximum 10
Please take inspiration from this readme.txt

wp-onpage-seo/on_page_seo.php 92% from 13 tests

Analyzing the main PHP file in "WordPress On Page SEO" version 2.4
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-onpage-seo.php" instead of "on_page_seo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin6,372 lines of code in 135 files:
LanguageFilesBlank linesComment linesLines of code
PHP1281,0425855,562
CSS48613496
JavaScript34611314

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.92
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes102
▷ Abstract classes2221.57%
▷ Concrete classes8078.43%
▷ Final classes00.00%
Methods298
▷ Static methods3612.08%
▷ Public methods23879.87%
▷ Protected methods6020.13%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants13.45%
▷ Class constants2896.55%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
images/ui/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
images/factor_na.png0.93KB1.01KB0.00%
images/ui/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
images/icon.png0.80KB0.79KB▼ 1.70%