90% chokidar

Code Review | Chokidar

WordPress plugin Chokidar scored90%from 54 tests.

About plugin

  • Plugin page: chokidar
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2023
  • Latest release: Jun 13, 2023
  • Number of updates: 29
  • Update frequency: every 3.3 days
  • Top authors: devkabir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /374 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
Installer ran successfully

Server metrics [RAM: ▼0.24MB] [CPU: ▼13.38ms] Passed 4 tests

Server-side resources used by Chokidar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.15 ▼1.325.41 ▼33.29
Dashboard /wp-admin3.44 ▲0.0945.62 ▼13.12
Posts /wp-admin/edit.php3.55 ▲0.1948.44 ▲0.87
Add New Post /wp-admin/post-new.php6.02 ▲0.1390.76 ▼7.99
Media Library /wp-admin/upload.php3.36 ▲0.1335.89 ▲0.93

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Chokidar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6114.24 ▼0.451.69 ▲0.0637.78 ▼1.69
Dashboard /wp-admin2,213 ▲445.59 ▼0.0791.21 ▼9.6645.06 ▲1.23
Posts /wp-admin/edit.php2,118 ▲181.96 ▲0.0138.61 ▲1.5535.30 ▲1.87
Add New Post /wp-admin/post-new.php1,543 ▲1723.01 ▼0.55589.68 ▼104.6148.16 ▼9.71
Media Library /wp-admin/upload.php1,421 ▲214.24 ▲0.0294.88 ▼19.2241.32 ▼7.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: brute force, visitor, list, tracking, attempts...

chokidar/chokidar.php Passed 13 tests

The main file in "Chokidar" v. 1.0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
73 characters long description:
Boost Your Website Performance and Security with Top 10 Visitor Insights!

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin5,662 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP276819965,653
JSON1005
CSS1004

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 301)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity29.06
▷ Minimum class complexity1.00
▷ Maximum class complexity344.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity301.00
Code structure
Namespaces7
Interfaces0
Traits1
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes1376.47%
Methods105
▷ Static methods6460.95%
▷ Public methods8883.81%
▷ Protected methods00.00%
▷ Private methods1716.19%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants24
▷ Global constants416.67%
▷ Class constants2083.33%
▷ Public constants1050.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
No PNG images were found in this plugin