84% top-sites-url-list

Code Review | TOP Sites URL list

WordPress plugin TOP Sites URL list scored84%from 54 tests.

About plugin

  • Plugin page: top-sites-url-list
  • Plugin version: 1.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2015
  • Latest release: Nov 10, 2017
  • Number of updates: 24
  • Update frequency: every 32.7 days
  • Top authors: w3b_designer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,089 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼6.08ms] Passed 4 tests

A check of server-side resources used by TOP Sites URL list
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0923.99 ▼18.46
Dashboard /wp-admin3.49 ▲0.1850.31 ▼1.49
Posts /wp-admin/edit.php3.60 ▲0.2451.57 ▲4.97
Add New Post /wp-admin/post-new.php6.09 ▲0.2099.41 ▼3.50
Media Library /wp-admin/upload.php3.41 ▲0.1836.49 ▼0.88
TOP Sites URL list /wp-admin/options-general.php?page=tsul_settings_page3.3831.14

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 156 new files
Database: no new tables, 16 new options
New WordPress options
tsul_google_uid
tsul_google_authtoken
theysaidso_admin_options
tsul_google_token
widget_recent-comments
widget_tsul
tsul_show_in_admin_tables
widget_recent-posts
tsul_cron_recurrance
tsul_stats
...

Browser metrics Passed 4 tests

A check of browser resources used by TOP Sites URL list
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12114.01 ▼0.251.91 ▲0.1840.24 ▼0.59
Dashboard /wp-admin2,249 ▲585.34 ▼0.55106.57 ▲5.4339.81 ▲0.21
Posts /wp-admin/edit.php2,131 ▲422.19 ▲0.1445.38 ▲5.5536.99 ▲1.47
Add New Post /wp-admin/post-new.php1,546 ▲2723.38 ▲0.33618.34 ▼60.1735.61 ▼21.78
Media Library /wp-admin/upload.php1,431 ▲434.68 ▲0.48100.93 ▲1.6342.50 ▼3.23
TOP Sites URL list /wp-admin/options-general.php?page=tsul_settings_page8512.1730.3428.81

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 16 options
    • widget_recent-posts
    • widget_tsul
    • tsul_stats
    • widget_theysaidso_widget
    • tsul_google_authtoken
    • tsul_google_token
    • db_upgraded
    • can_compress_scripts
    • tsul_first_fetch
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Freebase.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/top-sites-url-list/widget.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Dns.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Tasks.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Reseller.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Dataflow.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/AndroidPublisher.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/Audit.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/TagManager.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/top-sites-url-list/google-api-php-client/src/Google/Service/AdSenseHost.php:32

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

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === top-sites-url-list === )
The official readme.txt might help

top-sites-url-list/top-sites-url-list.php Passed 13 tests

The main PHP file in "TOP Sites URL list" ver. 1.7.1 adds more information about the plugin and also serves as the entry point for this plugin
91 characters long description:
This plugin provides a list of top visited sites on your web based on Google Analytics API.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin180,234 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP13110,79331,870167,128
JavaScript32,1351,15611,829
CSS465541,199
Markdown249078

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.02
Average class complexity1.22
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes2,996
▷ Abstract classes60.20%
▷ Concrete classes2,99099.80%
▷ Final classes00.00%
Methods23,619
▷ Static methods130.06%
▷ Public methods23,55299.72%
▷ Protected methods300.13%
▷ Private methods370.16%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants253
▷ Global constants00.00%
▷ Class constants253100.00%
▷ Public constants253100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
images/ui/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
images/ui/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
images/ui/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
images/ui/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%