10% twitter-peep

Code Review | Twitter Peep

WordPress plugin Twitter Peep scored10%from 54 tests.

About plugin

  • Plugin page: twitter-peep
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9
  • WordPress version: 6.3.1
  • First release: Apr 23, 2014
  • Latest release: Apr 24, 2014
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: abhisheksaha11 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /699 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/twitter-peep/twitter-peep.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; Twitter_Peep has a deprecated constructor

Server metrics [RAM: ▼1.96MB] [CPU: ▼59.43ms] Passed 4 tests

An overview of server-side resources used by Twitter Peep
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.47 ▼37.52
Dashboard /wp-admin2.05 ▼1.266.00 ▼48.73
Posts /wp-admin/edit.php2.05 ▼1.316.48 ▼44.94
Add New Post /wp-admin/post-new.php2.05 ▼3.847.09 ▼106.52
Media Library /wp-admin/upload.php2.05 ▼1.185.47 ▼32.47
Twitter Peep /wp-admin/options-general.php?page=twitterWidget2.058.03

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_twitter
can_compress_scripts
theysaidso_admin_options
attp_version
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Twitter Peep
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.47 ▲0.181.67 ▼0.2839.26 ▼3.82
Dashboard /wp-admin2,223 ▲354.83 ▼1.05101.52 ▼17.1244.50 ▼1.91
Posts /wp-admin/edit.php2,105 ▲192.02 ▲0.0136.33 ▼2.1734.99 ▼0.40
Add New Post /wp-admin/post-new.php1,529 ▲1017.63 ▼5.54628.74 ▼41.5557.64 ▲0.55
Media Library /wp-admin/upload.php1,399 ▲144.23 ▲0.00101.30 ▼1.2242.21 ▼7.35
Twitter Peep /wp-admin/options-general.php?page=twitterWidget1,5145.5177.0287.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the light-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • attp_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_twitter
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the light-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the font-awesome handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the nice-scroll handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the admin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the custom-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Twitter_Peep is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=twitterWidget
    • > Notice in wp-content/plugins/twitter-peep/twitter-peep.php+724
    Undefined index: stats

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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-peep/tlc-transients.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/twitter-peep/tlc-transients.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: twitter-peep, twitter, plugin

twitter-peep/twitter-peep.php 92% from 13 tests

This is the main PHP file of "Twitter Peep" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,380 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript25551132,524
PHP52873171,744
CSS31823107
SVG5005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity36.57
▷ Minimum class complexity6.00
▷ Maximum class complexity141.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods95
▷ Static methods88.42%
▷ Public methods6770.53%
▷ Protected methods77.37%
▷ Private methods2122.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/time.png0.37KB0.61KB0.00%