90% cart-favicon

Code Review | cart-favicon

WordPress plugin cart-favicon scored 90% from 54 tests.

About plugin

  • Plugin page: cart-favicon
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2021
  • Latest release: Jul 13, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: srinathdevinfo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 286 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by cart-favicon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.73 ▼22.45
Dashboard /wp-admin3.31 ▲0.0146.20 ▼3.05
Posts /wp-admin/edit.php3.36 ▲0.0046.65 ▼2.74
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.70 ▼1.01
Media Library /wp-admin/upload.php3.23 ▲0.0038.00 ▲5.98

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

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

Browser metrics Passed 4 tests

cart-favicon: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼0.981.70 ▼0.5542.41 ▼10.31
Dashboard /wp-admin2,209 ▲385.90 ▲1.0396.61 ▼6.6639.37 ▼8.03
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0339.84 ▼1.3736.77 ▼3.09
Add New Post /wp-admin/post-new.php1,514 ▼1917.78 ▼5.75640.00 ▲63.6951.89 ▼0.35
Media Library /wp-admin/upload.php1,385 ▼34.20 ▲0.04119.81 ▲20.3047.86 ▲1.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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 your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cart-favicon === )
You can take inspiration from this readme.txt

cart-favicon/cart-favicon.php Passed 13 tests

Analyzing the main PHP file in "cart-favicon" version 1.0.0
57 characters long description:
Add cart item count on your favicon with animated badges.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin832 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript237128751
PHP2613381

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin