84% saeid-simple-text-rotator

Code Review | Saeid Simple Text Rotator

WordPress plugin Saeid Simple Text Rotator scored84%from 54 tests.

About plugin

  • Plugin page: saeid-simple-text...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Feb 4, 2015
  • Latest release: May 17, 2015
  • Number of updates: 4
  • Update frequency: every 25.5 days
  • Top authors: hojjatmr (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /5,217 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

An overview of server-side resources used by Saeid Simple Text Rotator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0132.75 ▼12.36
Dashboard /wp-admin3.31 ▼0.0344.44 ▼12.44
Posts /wp-admin/edit.php3.36 ▲0.0146.20 ▲3.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.29 ▼12.48
Media Library /wp-admin/upload.php3.24 ▲0.0133.71 ▲0.66

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Saeid Simple Text Rotator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.59 ▼0.791.62 ▼0.2043.53 ▼0.36
Dashboard /wp-admin2,206 ▲155.86 ▲0.95109.82 ▲5.1443.15 ▲0.98
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0243.68 ▲2.8837.69 ▲1.53
Add New Post /wp-admin/post-new.php1,533 ▲1223.17 ▲0.09641.87 ▲12.0656.20 ▲3.03
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0196.82 ▲1.1342.52 ▼0.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saeid-simple-text-rotator/saeid-text-rotator.php:18

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("mailto: peratik@gmail.com")
You can take inspiration from this readme.txt

saeid-simple-text-rotator/saeid-text-rotator.php 92% from 13 tests

The main PHP script in "Saeid Simple Text Rotator" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("saeid-simple-text-rotator.php" instead of "saeid-text-rotator.php")

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 plugin262 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12513129
CSS114092
PHP18841

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected