83% wpfox-infobox-rotator

Code Review | Wpfox Infobox rotator

WordPress plugin Wpfox Infobox rotator scored83%from 54 tests.

About plugin

  • Plugin page: wpfox-infobox-rot...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.1-5.4
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Jun 6, 2020
  • Number of updates: 17
  • Update frequency: every 0.2 days
  • Top authors: thewpfox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /426 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.59ms] Passed 4 tests

An overview of server-side resources used by Wpfox Infobox rotator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0053.55 ▲10.08
Dashboard /wp-admin3.35 ▲0.0049.43 ▼10.57
Posts /wp-admin/edit.php3.40 ▲0.0048.43 ▼5.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0088.04 ▼5.64
Media Library /wp-admin/upload.php3.27 ▲0.0039.00 ▼0.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Wpfox Infobox rotator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.131.71 ▼0.0741.85 ▼0.43
Dashboard /wp-admin2,198 ▲215.55 ▲0.0282.57 ▼2.7238.64 ▼2.09
Posts /wp-admin/edit.php2,100 ▲32.01 ▼0.0034.52 ▼3.7430.94 ▼7.88
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▲0.06681.04 ▲61.6450.66 ▼3.99
Media Library /wp-admin/upload.php1,400 ▼04.17 ▲0.0396.71 ▼5.4342.21 ▼7.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wpfox-infobox-rotator/classes/view/dash.php:3

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #3 in wpfox-infobox-rotator/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wpfox-infobox-rotator/wpfox-infobox-rotator.php 92% from 13 tests

The main PHP script in "Wpfox Infobox rotator" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 176 characters long)

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
No dangerous file extensions were detected103,535 lines of code in 163 files:
LanguageFilesBlank linesComment linesLines of code
CSS9911,0849,21656,818
JavaScript543,3311,41743,315
SVG30122,880
PHP36320391
PO File2360107
JSON10020
Markdown1304

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assests/lib/semantic/themes/default/assets/images/flags.png27.46KB29.21KB0.00%
assests/img/wpfox_logo.png77.04KB19.68KB▼ 74.46%