83% cache-tweets-widget

Code Review | Cache Tweets Widget

WordPress plugin Cache Tweets Widget scored83%from 54 tests.

About plugin

  • Plugin page: cache-tweets-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: Jun 23, 2015
  • Number of updates: 9
  • Update frequency: every 44.4 days
  • Top authors: vickythegme (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /1,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼7.09ms] Passed 4 tests

Server-side resources used by Cache Tweets Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2338.79 ▲0.67
Dashboard /wp-admin3.56 ▲0.2148.80 ▼23.82
Posts /wp-admin/edit.php3.61 ▲0.2553.17 ▲4.94
Add New Post /wp-admin/post-new.php6.08 ▲0.1988.76 ▼8.30
Media Library /wp-admin/upload.php3.42 ▲0.1939.27 ▲3.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_visearch_tweets_widget
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Cache Tweets Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.221.56 ▼0.0437.51 ▼7.17
Dashboard /wp-admin2,198 ▲245.61 ▲0.0884.42 ▼9.6942.43 ▲1.63
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.1134.59 ▼1.4635.89 ▼1.94
Add New Post /wp-admin/post-new.php1,526 ▼223.05 ▼0.06689.16 ▲76.7055.71 ▼1.70
Media Library /wp-admin/upload.php1,400 ▲64.17 ▼0.03111.95 ▲6.5746.49 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cache-tweets-widget/widget.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.(png)), #2 (screenshot-2.(png))
The official readme.txt might help

cache-tweets-widget/widget.php 85% from 13 tests

The main file in "Cache Tweets Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cache-tweets-widget.php" instead of "widget.php")

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
Good job! No executable or dangerous file extensions detected895 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5187344875
CSS12020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.62
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods83
▷ Static methods1012.05%
▷ Public methods7286.75%
▷ Protected methods22.41%
▷ Private methods910.84%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png51.65KB17.98KB▼ 65.18%
screenshot-2.png40.09KB12.24KB▼ 69.48%