84% post-rotation

Code Review | Post Rotation

WordPress plugin Post Rotation scored84%from 54 tests.

About plugin

  • Plugin page: post-rotation
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: May 30, 2015
  • Latest release: Apr 15, 2021
  • Number of updates: 37
  • Update frequency: every 58.1 days
  • Top authors: digitalemphasis (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

400+ active /6,975 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.33ms] Passed 4 tests

A check of server-side resources used by Post Rotation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.91 ▼1.91
Dashboard /wp-admin3.33 ▲0.0268.42 ▲11.42
Posts /wp-admin/edit.php3.38 ▲0.0248.95 ▼1.21
Add New Post /wp-admin/post-new.php5.93 ▲0.0494.79 ▼6.43
Media Library /wp-admin/upload.php3.25 ▲0.0238.86 ▲0.22
Post Rotation /wp-admin/edit.php?page=post-rotation3.2834.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 17 new options
New WordPress options
can_compress_scripts
widget_recent-comments
pr_filter_by_category
theysaidso_admin_options
pr_also_alter_last_modified
pr_enabled
pr_included_categories
db_upgraded
pr_fixed
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Post Rotation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.34 ▼0.231.71 ▼0.6543.30 ▼2.77
Dashboard /wp-admin2,206 ▲295.66 ▲0.0787.59 ▼12.4539.38 ▼3.74
Posts /wp-admin/edit.php2,108 ▲51.99 ▼0.0540.59 ▲2.6937.17 ▲2.58
Add New Post /wp-admin/post-new.php1,535 ▲923.17 ▲0.23628.28 ▼63.4148.43 ▼11.79
Media Library /wp-admin/upload.php1,405 ▲84.20 ▼0.1399.86 ▼16.9542.18 ▼9.90
Post Rotation /wp-admin/edit.php?page=post-rotation9852.0525.9832.53

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/post-rotation/post-rotation-core.php
    • > /wp-content/plugins/post-rotation/admin/post-rotation-admin.php
    • > /wp-content/plugins/post-rotation/post-rotation.php

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 errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: rotation, rotator, interval, post rotator, automatic

post-rotation/post-rotation.php Passed 13 tests

The primary PHP file in "Post Rotation" version 1.9 is used by WordPress to initiate all plugin functionality
122 characters long description:
Set the rotation interval or the allowed time without new posts... and automatically an older post becomes the latest one!

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
Good job! No executable or dangerous file extensions detected392 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3789332
CSS10050
JavaScript10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions16
▷ Named functions1593.75%
▷ Anonymous functions16.25%
Constants1
▷ Global constants1100.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