89% dismiss-privacy-tools

Code Review | Dismiss Privacy Tools

WordPress plugin Dismiss Privacy Tools scored89%from 54 tests.

About plugin

  • Plugin page: dismiss-privacy-t...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-alpha-5.1
  • WordPress version: 6.3.1
  • First release: Jun 29, 2018
  • Latest release: Jan 25, 2019
  • Number of updates: 70
  • Update frequency: every 3.0 days
  • Top authors: Luciano Croce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,470 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.50ms] Passed 4 tests

Server-side resources used by Dismiss Privacy Tools
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.45 ▼0.14
Dashboard /wp-admin3.33 ▲0.0252.65 ▲0.31
Posts /wp-admin/edit.php3.38 ▲0.0248.02 ▼2.28
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.72 ▼11.87
Media Library /wp-admin/upload.php3.25 ▲0.0241.29 ▲5.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dismiss Privacy Tools
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.48 ▲0.101.75 ▼0.3640.64 ▼2.93
Dashboard /wp-admin2,212 ▲125.89 ▲0.03105.51 ▼10.6841.32 ▼5.21
Posts /wp-admin/edit.php2,091 ▼92.13 ▲0.1237.93 ▲1.0139.68 ▲5.21
Add New Post /wp-admin/post-new.php1,531 ▼1423.14 ▲0.19629.51 ▼0.8853.27 ▼7.55
Media Library /wp-admin/upload.php1,388 ▼94.23 ▼0.02112.62 ▲0.0449.17 ▲3.03

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Screenshot of "Dismiss Privacy Tools")
The official readme.txt is a good inspiration

dismiss-privacy-tools/dismiss-privacy-tools.php 85% from 13 tests

"Dismiss Privacy Tools" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Requires at least: Required version number formatted incorrectly (ex. "7.0" instead of "4.9.6-alpha")
  • Description: The description should be shorter than 140 characters (currently 183 characters long)

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
Good job! No executable or dangerous file extensions detected174 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP137365174

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.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
No PNG images were found in this plugin