90% confetti

Code Review | Confetti

WordPress plugin Confetti scored90%from 54 tests.

About plugin

  • Plugin page: confetti
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2021
  • Latest release: Nov 7, 2023
  • Number of updates: 36
  • Update frequency: every 22.7 days
  • Top authors: wpsunshine (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /11,921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.61ms] Passed 4 tests

A check of server-side resources used by Confetti
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0637.73 ▼5.21
Dashboard /wp-admin3.42 ▲0.1146.07 ▼3.16
Posts /wp-admin/edit.php3.53 ▲0.1744.83 ▼0.83
Add New Post /wp-admin/post-new.php6.02 ▲0.1490.95 ▼1.24
Media Library /wp-admin/upload.php3.34 ▲0.1135.42 ▲2.07
Confetti /wp-admin/options-general.php?page=wps_confetti3.3629.63

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
wps_confetti
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Confetti
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲3214.69 ▲0.341.78 ▼0.2139.63 ▼5.09
Dashboard /wp-admin2,199 ▲185.61 ▼0.0891.52 ▼12.1342.73 ▼0.28
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0041.39 ▲6.7435.93 ▼3.05
Add New Post /wp-admin/post-new.php6,200 ▲4,67419.18 ▼4.09904.56 ▲168.3755.23 ▲1.56
Media Library /wp-admin/upload.php1,398 ▼54.18 ▼0.0197.97 ▼0.3242.61 ▼2.15
Confetti /wp-admin/options-general.php?page=wps_confetti1,0892.0736.1146.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • wps_confetti
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

confetti/confetti.php Passed 13 tests

The main PHP file in "Confetti" ver. 1.3.5 adds more information about the plugin and also serves as the entry point for this plugin
129 characters long description:
Add some fun and excitement to your site with confetti effects on any page of your WordPress site via shortcode or block, easily!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,132 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP6147236549
JavaScript58247542
CSS29040
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity15.75
▷ Minimum class complexity2.00
▷ Maximum class complexity38.00
Average method complexity2.84
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods13.12%
▷ Public methods3093.75%
▷ Protected methods00.00%
▷ Private methods26.25%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin