79% pearl-twitter

Code Review | Easy Twitter Widget

WordPress plugin Easy Twitter Widget scored79%from 54 tests.

About plugin

  • Plugin page: pearl-twitter
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Mar 30, 2019
  • Number of updates: 13
  • Update frequency: every 54.0 days
  • Top authors: pearlthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /1,909 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

This is a short check of server-side resources used by Easy Twitter Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.10 ▲4.68
Dashboard /wp-admin3.33 ▲0.0244.11 ▼1.16
Posts /wp-admin/edit.php3.44 ▲0.0846.49 ▼0.27
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.50 ▼20.22
Media Library /wp-admin/upload.php3.25 ▲0.0236.37 ▲3.26

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Twitter Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.61 ▲0.345.59 ▲1.2842.81 ▲3.67
Dashboard /wp-admin2,213 ▲284.85 ▼0.98108.92 ▲7.8435.46 ▼9.12
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0440.21 ▲2.6035.38 ▼0.72
Add New Post /wp-admin/post-new.php1,518 ▼1523.46 ▲0.28650.57 ▲14.4451.42 ▲2.26
Media Library /wp-admin/upload.php1,389 ▲74.19 ▼0.01100.40 ▲0.8540.07 ▼3.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_pearl_twitter_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/pearl-twitter/public/partials/pearl-twitter-public-display.php
    • > /wp-content/plugins/pearl-twitter/admin/partials/pearl-twitter-admin-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/pearl-twitter/admin/class-pearl-twitter-widget.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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: twitter, twitter widget, twitter tweets

pearl-twitter/pearl-twitter.php Passed 13 tests

Analyzing the main PHP file in "Easy Twitter Widget" version 1.2.0
84 characters long description:
A light weight plugin to display recent Tweets with awesome customizability options.

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
Success! There were no dangerous files found in this plugin514 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13231625491
CSS26817
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.25
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.32
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3282.05%
▷ Protected methods00.00%
▷ Private methods717.95%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected