84% wp-text-slider-widget

Code Review | Wp Text Slider Widget

WordPress plugin Wp Text Slider Widget scored84%from 54 tests.

About plugin

  • Plugin page: wp-text-slider-wi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.6
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Sep 21, 2016
  • Number of updates: 4
  • Update frequency: every 4.0 days
  • Top authors: codeaffairs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Wp Text Slider Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.68 ▼5.99
Dashboard /wp-admin3.33 ▲0.0352.62 ▲1.36
Posts /wp-admin/edit.php3.38 ▲0.0350.59 ▲4.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0387.26 ▼1.75
Media Library /wp-admin/upload.php3.26 ▲0.0338.92 ▲5.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wp Text Slider Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲11013.27 ▼1.102.36 ▲0.4044.11 ▼2.35
Dashboard /wp-admin2,225 ▲375.86 ▲0.9897.06 ▼19.7838.85 ▼7.02
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0435.18 ▼5.8132.91 ▼2.34
Add New Post /wp-admin/post-new.php1,547 ▲1423.28 ▼0.13670.75 ▼23.8152.07 ▼6.88
Media Library /wp-admin/upload.php1,404 ▲164.19 ▲0.0494.24 ▼18.3042.02 ▼6.13

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_wptextsliiderwidget
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-text-slider-widget/wp-text-slider.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-text-slider-widget/admin/wp-text-slider-admin-page.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: text widget, simple text slider, text slider widget, text slider

wp-text-slider-widget/wp-text-slider.php 92% from 13 tests

The main file in "Wp Text Slider Widget" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-text-slider-widget.php" instead of "wp-text-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin115 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22011104
JavaScript11011
CSS1010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin