78% consume-this

Code Review | Consume This

WordPress plugin Consume This scored78%from 54 tests.

About plugin

  • Plugin page: consume-this
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.2
  • WordPress version: 6.3.1
  • First release: Jul 5, 2011
  • Latest release: Mar 14, 2012
  • Number of updates: 5
  • Update frequency: every 50.4 days
  • Top authors: mintindeed (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,163 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Consume This
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.12 ▼0.74
Dashboard /wp-admin3.34 ▲0.0460.76 ▲7.69
Posts /wp-admin/edit.php3.40 ▲0.0452.68 ▲3.20
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.91 ▼3.20
Media Library /wp-admin/upload.php3.26 ▲0.0439.93 ▼0.27
Add New /wp-admin/post-new.php?post_type=consumption3.2840.99
Consumption /wp-admin/edit.php?post_type=consumption3.3134.92
Consumables /wp-admin/edit-tags.php?taxonomy=consumable&post_type=consumption3.2634.93

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Consume This
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.35 ▼0.001.64 ▼0.5947.01 ▼0.92
Dashboard /wp-admin2,220 ▲435.54 ▼0.0985.97 ▼11.6940.48 ▼3.31
Posts /wp-admin/edit.php2,134 ▲342.01 ▲0.0140.00 ▲3.5234.31 ▼1.26
Add New Post /wp-admin/post-new.php1,552 ▲1323.53 ▲5.50680.96 ▲12.3552.81 ▼22.85
Media Library /wp-admin/upload.php1,434 ▲344.17 ▼0.12100.61 ▼0.4444.80 ▼4.82
Add New /wp-admin/post-new.php?post_type=consumption1,6662.7955.1848.59
Consumption /wp-admin/edit.php?post_type=consumption1,1091.9630.5932.72
Consumables /wp-admin/edit-tags.php?taxonomy=consumable&post_type=consumption1,2772.1225.3030.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=consumption
    • > User deprecated in wp-includes/functions.php+5463
    Function get_shortcut_link is deprecated since version 4.9.0 with no alternative available.

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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/consume-this/theme-files/archive-consumption.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/consume-this/consume-this.php:101

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Add new "Consumption"), #2 (Example display using TwentyTen theme and the included archive-consumption.php template), #3 ("Consume This" bookmarklet)
The official readme.txt is a good inspiration

consume-this/consume-this.php Passed 13 tests

"Consume This" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
120 characters long description:
A Delicious.com-like bookmarklet for your site. Tell people what you're consuming -- links, music, movies, you name it.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin214 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP254100214

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.76MB with 0.49MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png401.90KB137.68KB▼ 65.74%
screenshot-1.png89.91KB37.77KB▼ 57.99%
screenshot-3.png288.53KB87.64KB▼ 69.62%