62% wp-thumbs

Code Review | WP Thumbs Plugin

WordPress plugin WP Thumbs Plugin scored62%from 54 tests.

About plugin

  • Plugin page: wp-thumbs
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.4
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Nov 27, 2012
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: apinnt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,749 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.07ms] Passed 4 tests

This is a short check of server-side resources used by WP Thumbs Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.03 ▼3.07
Dashboard /wp-admin3.32 ▲0.0246.12 ▼6.24
Posts /wp-admin/edit.php3.37 ▲0.0247.19 ▼3.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.47 ▼3.83
Media Library /wp-admin/upload.php3.25 ▲0.0234.80 ▲1.47
WP Thumbs /wp-admin/options-general.php?page=wp-thumbs3.2433.82

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: 1 new table, 16 new options
New tables
wp_plugin_wp_thumbs
New WordPress options
wp_thumbs_display_mode
wp_thumbs_show_graph_clicks
wp_thumbs_db_version
widget_recent-posts
theysaidso_admin_options
wp_thumbs_table_name
wp_thumbs_show_clicks
wp_thumbs_show_graph
widget_theysaidso_widget
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP Thumbs Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲18513.60 ▼0.696.26 ▲4.4536.10 ▼13.28
Dashboard /wp-admin2,214 ▲264.85 ▲0.00115.02 ▼7.1842.04 ▼6.52
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0340.07 ▲1.8832.75 ▼7.33
Add New Post /wp-admin/post-new.php1,521 ▼2123.21 ▲4.95608.50 ▼2.7958.90 ▲5.15
Media Library /wp-admin/upload.php1,393 ▲54.21 ▲0.02102.67 ▲6.1443.60 ▲1.93
WP Thumbs /wp-admin/options-general.php?page=wp-thumbs9502.0526.5026.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_plugin_wp_thumbs
  • The uninstall procedure has failed, leaving 16 options in the database
    • wp_thumbs_show_clicks
    • wp_thumbs_show_graph
    • wp_thumbs_domain
    • wp_thumbs_show_graph_clicks
    • wp_thumbs_show_thankyou
    • wp_thumbs_db_version
    • widget_recent-comments
    • wp_thumbs_display_location
    • wp_thumbs_display_mode
    • widget_theysaidso_widget
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-thumbs
    • > Notice in wp-content/plugins/wp-thumbs/thumbs.php+128
    Trying to get property 'num_rows' of non-object

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-thumbs/thumbs.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-thumbs/settings.php:75

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-thumbs
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-thumbs/js/thumbs.js?ver=6.3.1:2:29)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-thumbs
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === wp-thumbs === )
  • Screenshots: Add images for these screenshots: #1 (Here is normal mode), #2 (Here is Thumbs mode), #3 (Here is Like only mode)
You can take inspiration from this readme.txt

wp-thumbs/thumbs.php 92% from 13 tests

The main PHP script in "WP Thumbs Plugin" version 1.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-thumbs.php" instead of "thumbs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin441 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP48147298
CSS190111
JavaScript11032

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png16.87KB7.12KB▼ 57.83%
screenshot-1.png18.61KB7.99KB▼ 57.09%
screenshot-2.png21.66KB8.57KB▼ 60.43%