58% webmaster-tools

Code Review | Webmaster Tools

WordPress plugin Webmaster Tools scored58%from 54 tests.

About plugin

  • Plugin page: webmaster-tools
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Dec 27, 2013
  • Latest release: Jul 29, 2018
  • Number of updates: 34
  • Update frequency: every 49.3 days
  • Top authors: LionScripts.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /14,578 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.21ms] Passed 4 tests

An overview of server-side resources used by Webmaster Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0637.03 ▼2.46
Dashboard /wp-admin3.34 ▲0.0443.45 ▼6.27
Posts /wp-admin/edit.php3.45 ▲0.1047.90 ▲1.22
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.15 ▼13.32
Media Library /wp-admin/upload.php3.26 ▲0.0336.49 ▲2.02
Dashboard /wp-admin/admin.php?page=lionscripts-dashboard3.2330.53
Webmaster Tools /wp-admin/admin.php?page=lionscripts-webmaster-tools3.2333.57

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
lionscripts_wt_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Webmaster Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲11313.22 ▼1.451.79 ▲0.1041.19 ▼2.52
Dashboard /wp-admin2,232 ▲415.84 ▼0.06106.77 ▼9.6776.71 ▲32.52
Posts /wp-admin/edit.php2,115 ▲262.00 ▼0.0237.97 ▼3.3137.00 ▲2.20
Add New Post /wp-admin/post-new.php1,690 ▲15822.24 ▼1.10689.75 ▲71.3457.39 ▲10.05
Media Library /wp-admin/upload.php1,411 ▲204.15 ▼0.02104.45 ▲4.7544.01 ▲0.60
Dashboard /wp-admin/admin.php?page=lionscripts-dashboard9492.0425.8030.33
Webmaster Tools /wp-admin/admin.php?page=lionscripts-webmaster-tools1,1361.7726.9829.46

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Error in wp-content/plugins/webmaster-tools/plg.settings.php+84
    Uncaught Error: Call to a member function deactivate() on null in wp-content/plugins/webmaster-tools/plg.settings.php:84
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): lionscripts_wt_uninstall()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1269): do_action()
    #4 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 17 files (0.53MB) in the plugin directory
    • (new file) assets/images/socialize2.png
    • (new file) assets/images/socialize.png
    • (new file) assets/images/icon-delete-16.png
    • (new file) assets/images/ls-icon-32.png
    • (new file) assets/images/logo.png
    • (new file) assets/images/pro.png
    • (new file) assets/images/ls-icon-16.png
    • (new file) assets/css/style.css
    • (new file) assets/images/icon-32.png
    • (new file) assets/images/icon-16.png
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/webmaster-tools/index.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'lionscripts_plg' not found in wp-content/plugins/webmaster-tools/lib/lionscripts_plg_wt.class.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/webmaster-tools/lib/lionscripts_plg_wt.class.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/webmaster-tools/lib/lionscripts_plg_wt.class.php:31

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 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (Main Page (Settings Page))
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can take inspiration from this readme.txt

webmaster-tools/webmaster-tools.php 92% from 13 tests

The principal PHP file in "Webmaster Tools" v. 2.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 202 characters long)

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 plugin793 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP510621572
CSS1342221

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity19.50
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.37MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/socialize.png154.03KB59.31KB▼ 61.49%
assets/images/ls-icon-16.png1.14KB0.63KB▼ 44.34%
assets/images/icon-16.png0.86KB0.95KB0.00%
assets/images/logo.png3.29KB2.16KB▼ 34.51%
assets/images/socialize2.png154.36KB58.84KB▼ 61.88%