84% horizontal-slider-for-your-tweets

Code Review | Horizontal Slider for your tweets

WordPress plugin Horizontal Slider for your tweets scored84%from 54 tests.

About plugin

  • Plugin page: horizontal-slider...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Apr 20, 2016
  • Latest release: Jun 3, 2016
  • Number of updates: 4
  • Update frequency: every 11.0 days
  • Top authors: kiranpatil353 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /852 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.88ms] Passed 4 tests

This is a short check of server-side resources used by Horizontal Slider for your tweets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.93 ▼1.70
Dashboard /wp-admin3.31 ▲0.0048.26 ▼7.09
Posts /wp-admin/edit.php3.36 ▲0.0047.87 ▼4.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.88 ▼10.66
Media Library /wp-admin/upload.php3.23 ▲0.0039.13 ▲3.76

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Horizontal Slider for your tweets: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.29 ▼1.501.95 ▼0.1745.41 ▼0.78
Dashboard /wp-admin2,209 ▲184.84 ▼0.98100.54 ▼3.4738.37 ▼8.30
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0135.94 ▼7.9134.49 ▼4.52
Add New Post /wp-admin/post-new.php1,514 ▼1517.59 ▼0.92692.94 ▲59.8261.05 ▲9.81
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.04111.94 ▲5.8446.64 ▲3.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% 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 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
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 is_admin() in wp-content/plugins/horizontal-slider-for-your-tweets/settings-page-slider.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/horizontal-slider-for-your-tweets/settings-page-slider.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: twitter post slider, tweets one at time, twitter feed slider, twitter horizontal slider, twitter api post slider

horizontal-slider-for-your-tweets/index.php 92% from 13 tests

The primary PHP file in "Horizontal Slider for your tweets" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("horizontal-slider-for-your-tweets.php" instead of "index.php")

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
Success! There were no dangerous files found in this plugin877 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4190327762
CSS17062
JavaScript114852
Markdown1001

PHP code Passed 2 tests

This is a very shot 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.26
Average class complexity7.92
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods76
▷ Static methods1013.16%
▷ Public methods6585.53%
▷ Protected methods22.63%
▷ Private methods911.84%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.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