90% woonti

Code Review | WooNti

WordPress plugin WooNti scored90%from 54 tests.

About plugin

  • Plugin page: woonti
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.9
  • WordPress version: 6.3.1
  • First release: Mar 21, 2018
  • Latest release: Mar 29, 2018
  • Number of updates: 6
  • Update frequency: every 1.7 days
  • Top authors: al5dy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /526 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WooNti
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.04 ▼5.53
Dashboard /wp-admin3.44 ▲0.1350.57 ▼5.78
Posts /wp-admin/edit.php3.55 ▲0.1953.54 ▲6.32
Add New Post /wp-admin/post-new.php6.02 ▲0.1385.20 ▼11.29
Media Library /wp-admin/upload.php3.36 ▲0.1335.49 ▼2.40
Notifications /wp-admin/admin.php?page=woonti3.3333.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WooNti
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.57 ▼0.051.73 ▲0.1243.82 ▼1.29
Dashboard /wp-admin2,198 ▲185.63 ▲0.0184.52 ▼17.6942.96 ▼0.05
Posts /wp-admin/edit.php2,097 ▼61.94 ▼0.0838.31 ▼1.1332.08 ▼4.82
Add New Post /wp-admin/post-new.php1,526 ▼223.58 ▲0.37698.07 ▲20.7055.21 ▼0.88
Media Library /wp-admin/upload.php1,400 ▲34.28 ▲0.0995.86 ▼12.1941.23 ▼8.03
Notifications /wp-admin/admin.php?page=woonti1,1972.0222.9230.63

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
You can take inspiration from this readme.txt

woonti/woonti.php Passed 13 tests

"WooNti" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Improves notifications for your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin3,543 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP8188325685
PO File1252464183
CSS2032
JavaScript2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity31.00
▷ Minimum class complexity2.00
▷ Maximum class complexity63.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods30
▷ Static methods310.00%
▷ Public methods2893.33%
▷ Protected methods00.00%
▷ Private methods26.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/template-default.png5.92KB3.77KB▼ 36.22%
assets/images/template-icons.png6.99KB4.80KB▼ 31.28%
assets/images/template-images.png16.65KB7.62KB▼ 54.24%
assets/images/newyear-pattern.png71.73KB20.91KB▼ 70.85%
assets/images/donate.png10.09KB5.03KB▼ 50.19%