78% seo-monitor

Code Review | Seo Monitor

WordPress plugin Seo Monitor scored78%from 54 tests.

About plugin

  • Plugin page: seo-monitor
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Apr 24, 2015
  • Latest release: Jun 18, 2018
  • Number of updates: 8
  • Update frequency: every 144.0 days
  • Top authors: tobyhage (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,828 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.31MB] [CPU: ▲8.46ms] Passed 4 tests

An overview of server-side resources used by Seo Monitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.77 ▲1.3153.26 ▲11.74
Dashboard /wp-admin4.63 ▲1.3263.82 ▲9.89
Posts /wp-admin/edit.php4.68 ▲1.3257.87 ▲9.34
Add New Post /wp-admin/post-new.php7.16 ▲1.2897.19 ▲2.85
Media Library /wp-admin/upload.php4.55 ▲1.3254.28 ▲16.72
Reports /wp-admin/admin.php?page=seomonitor-reports4.5447.96
Search Engine /wp-admin/admin.php?page=seomonitor-se4.5249.44
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins4.5548.13
Logs /wp-admin/edit.php?post_type=seo_monitor_log4.5949.37
Keywords /wp-admin/admin.php?page=seomonitor-keywords4.5446.32
Sites /wp-admin/admin.php?page=seomonitor-sites4.5446.31
Rankings /wp-admin/admin.php?page=seomonitor-rankings4.4342.40
Tags /wp-admin/edit-tags.php?taxonomy=seo_monitor_log_type&post_type=seo_monitor_log4.5549.49
Add New /wp-admin/post-new.php?post_type=seo_monitor_log4.6757.02
Logs /wp-admin/admin.php?page=seomonitor-logging4.5355.97

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 8 new options
New WordPress options
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
seomonitor_db_version
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Seo Monitor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲12814.71 ▲0.421.73 ▼0.1042.90 ▼1.76
Dashboard /wp-admin2,292 ▲1125.66 ▲0.0899.03 ▲3.5646.57 ▲0.84
Posts /wp-admin/edit.php2,206 ▲1062.06 ▲0.0739.13 ▲1.2137.01 ▼2.48
Add New Post /wp-admin/post-new.php1,607 ▲7923.17 ▲0.08669.31 ▼12.3052.14 ▼5.38
Media Library /wp-admin/upload.php1,508 ▲1114.22 ▲0.02101.22 ▼3.3651.37 ▲4.37
Reports /wp-admin/admin.php?page=seomonitor-reports1,0711.8229.7336.79
Search Engine /wp-admin/admin.php?page=seomonitor-se7731.537.9219.86
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins1,0432.0825.4733.22
Logs /wp-admin/edit.php?post_type=seo_monitor_log1,1881.9935.0534.71
Keywords /wp-admin/admin.php?page=seomonitor-keywords1,2611.8626.6237.68
Sites /wp-admin/admin.php?page=seomonitor-sites1,1531.7028.2334.57
Rankings /wp-admin/admin.php?page=seomonitor-rankings1,1161.8626.3334.16
Tags /wp-admin/edit-tags.php?taxonomy=seo_monitor_log_type&post_type=seo_monitor_log1,5522.3330.4438.09
Add New /wp-admin/post-new.php?post_type=seo_monitor_log2,3237.80175.0364.74
Logs /wp-admin/admin.php?page=seomonitor-logging1,0991.7427.9536.16

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • 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
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=seomonitor-se
    • > Error in wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-search-engine.php+217
    Uncaught Error: Call to undefined function rwmb_meta() in wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-search-engine.php:217
    Stack trace:
    #0 wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-se-list-table.php(365): Seo_Monitor_Search_Engine->get_search_engines()
    #1 wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-se-list-table.php(393): Seo_Monitor_Se_List_Table->se_data()
    #2 wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-search-engine.php(318): Seo_Monitor_Se_List_Table->prepare_items()
    #3 wp-includes/class-wp-hook.php(310): Seo_Monitor_Search_Engine::display_all_search_engines()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 {main}
    thrown
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=seomonitor-rankings
    • > Notice in wp-content/plugins/seo-monitor/admin/keyword/class-seo-monitor-rank.php+576
    Undefined variable: keyword_id

SRP 50% 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
Please take a closer look at the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/seo-monitor/admin/site/class-seo-monitor-site-list-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-se-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/seo-monitor/includes/class-seo-monitor-logger.php:20
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-se-list-table.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/seo-monitor/admin/searchengine/class-seo-monitor-se-list-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/seo-monitor/admin/site/class-seo-monitor-site-list-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/seo-monitor/includes/helpers.php:33
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/seo-monitor/admin/site/class-seo-monitor-site-list-table.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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: You should set the name of your plugin on the first line ( === seo-monitor === )
  • Screenshots: Please add images for these screenshots: #1 (Keyword overview.), #2 (Ranking reports graphical view)
The official readme.txt might help

seo-monitor/seo-monitor.php Passed 13 tests

The main PHP script in "Seo Monitor" version 1.2 is automatically included on every request by WordPress
91 characters long description:
Seo Monitor is a free WordPress plugin to monitor your SEO performance for your website(s).

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin8,537 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP261,6024,3285,876
JavaScript56334542,614
CSS17047

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity25.68
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods370
▷ Static methods215.68%
▷ Public methods33490.27%
▷ Protected methods236.22%
▷ Private methods133.51%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.71MB with 0.46MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png253.01KB86.63KB▼ 65.76%
screenshot-2.png108.17KB38.87KB▼ 64.07%
assets/screenshot-2.png108.17KB38.87KB▼ 64.07%
assets/screenshot-1.png253.01KB86.63KB▼ 65.76%