84% twitter-display-and-cache

Code Review | Twitter Display and Cache

WordPress plugin Twitter Display and Cache scored84%from 54 tests.

About plugin

  • Plugin page: twitter-display-a...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Dec 7, 2013
  • Latest release: Mar 2, 2014
  • Number of updates: 15
  • Update frequency: every 5.7 days
  • Top authors: rashed.latif (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,714 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.73ms] Passed 4 tests

Analyzing server-side resources used by Twitter Display and Cache
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0339.07 ▼2.13
Dashboard /wp-admin3.38 ▲0.0344.69 ▼6.73
Posts /wp-admin/edit.php3.49 ▲0.0949.81 ▲1.89
Add New Post /wp-admin/post-new.php5.96 ▲0.0384.89 ▼17.56
Media Library /wp-admin/upload.php3.30 ▲0.0333.01 ▼0.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Twitter Display and Cache
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.081.71 ▲0.1138.67 ▼5.42
Dashboard /wp-admin2,198 ▲215.63 ▼0.0693.58 ▲5.8842.12 ▼3.94
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0339.42 ▲1.6542.19 ▲6.06
Add New Post /wp-admin/post-new.php1,526 ▼023.41 ▼0.19650.18 ▲29.5652.17 ▼2.99
Media Library /wp-admin/upload.php1,400 ▲34.21 ▼0.20102.44 ▲1.7340.30 ▼7.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_tt_twitter_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/twitter-display-and-cache/twitter-display-and-cache.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Twitter Widget Screen) image missing
The official readme.txt is a good inspiration

twitter-display-and-cache/twitter-display-and-cache.php Passed 13 tests

The main PHP file in "Twitter Display and Cache" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
Displays And Chaches Recent Tweets

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin781 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3206316781

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.46
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods83
▷ Static methods1012.05%
▷ Public methods6983.13%
▷ Protected methods22.41%
▷ Private methods1214.46%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin