10% footer-post-cyclic-rotation

Code Review | Footer Cyclic Content Rotation

WordPress plugin Footer Cyclic Content Rotation scored10%from 54 tests.

About plugin

  • Plugin page: footer-post-cycli...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6
  • WordPress version: 6.3.1
  • First release: Oct 17, 2020
  • Latest release: Feb 23, 2021
  • Number of updates: 11
  • Update frequency: every 11.8 days
  • Top authors: way2neelam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /408 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbyprAdminfunction has a deprecated constructor

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.82ms] Passed 4 tests

An overview of server-side resources used by Footer Cyclic Content Rotation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.30 ▼37.16
Dashboard /wp-admin2.09 ▼1.266.08 ▼54.32
Posts /wp-admin/edit.php2.09 ▼1.276.18 ▼39.30
Add New Post /wp-admin/post-new.php2.09 ▼3.805.54 ▼88.50
Media Library /wp-admin/upload.php2.09 ▼1.146.51 ▼26.23
Settings /wp-admin/admin.php?page=rbypr-settings2.095.56

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Footer Cyclic Content Rotation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.63 ▼1.052.07 ▲0.2640.71 ▼3.50
Dashboard /wp-admin2,225 ▲405.91 ▲0.09100.17 ▼14.1139.16 ▼4.09
Posts /wp-admin/edit.php2,111 ▲222.04 ▲0.0335.87 ▼1.8532.84 ▲0.21
Add New Post /wp-admin/post-new.php1,549 ▲2923.21 ▲0.06681.31 ▼0.6057.83 ▲1.34
Media Library /wp-admin/upload.php1,413 ▲314.15 ▼0.0695.64 ▼11.9442.65 ▼1.25
Settings /wp-admin/admin.php?page=rbypr-settings1,2402.0624.8026.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbyprAdminfunction has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=rbypr-settings
    • > Deprecated in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_function.class.php+6
    Methods with the same name as their class will not be constructors in a future version of PHP; rbyprAdminfunction has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=rbypr-settings
    • > Notice in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_menu.class.php+50
    Undefined index: isHomeDisplay
    • > GET request to /wp-admin/admin.php?page=rbypr-settings
    • > Notice in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_menu.class.php+51
    Undefined index: default_img_path
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rbypr-settings
    • > Warning in wp-content/plugins/footer-post-cyclic-rotation/includes/admin_menu.class.php+135
    Use of undefined constant RBYTB_PLUGIN_NAME - assumed 'RBYTB_PLUGIN_NAME' (this will throw an Error in a future version of PHP)

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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/footer-post-cyclic-rotation/includes/rbyrotation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/footer-post-cyclic-rotation/includes/template-function.php:107

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can look at the official readme.txt

footer-post-cyclic-rotation/footercyclicrotationcontent.php 85% from 13 tests

The main file in "Footer Cyclic Content Rotation" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("footer-post-cyclic-rotation.php" instead of "footercyclicrotationcontent.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected2,458 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS482821,981
PHP55031400
JavaScript110077

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
13 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/js/jquery-ui/themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%
assets/js/jquery-ui/themes/smoothness/images/ui-bg_glass_75_dadada_1x400.png0.26KB0.16KB▼ 38.93%
assets/js/jquery-ui/themes/smoothness/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
assets/js/jquery-ui/themes/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%