84% hc-privacy-compactor

Code Review | Compact Privacy Pages

WordPress plugin Compact Privacy Pages scored84%from 54 tests.

About plugin

  • Plugin page: hc-privacy-compactor
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 6.3.1
  • First release: May 14, 2018
  • Latest release: Aug 1, 2020
  • Number of updates: 6
  • Update frequency: every 135.7 days
  • Top authors: Clorith (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.06MB] [CPU: ▼12.85ms] Passed 4 tests

An overview of server-side resources used by Compact Privacy Pages
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0741.20 ▲0.85
Dashboard /wp-admin3.38 ▲0.0348.81 ▼17.86
Posts /wp-admin/edit.php3.49 ▲0.1349.15 ▼2.84
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.06 ▼27.97
Media Library /wp-admin/upload.php3.30 ▲0.0736.33 ▼2.72

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Compact Privacy Pages: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.37 ▼0.181.72 ▲0.1638.56 ▼5.56
Dashboard /wp-admin2,195 ▲185.61 ▲0.0284.94 ▼0.3038.65 ▼2.23
Posts /wp-admin/edit.php2,103 ▲31.97 ▼0.0136.28 ▲1.1533.10 ▼1.25
Add New Post /wp-admin/post-new.php1,526 ▼223.13 ▲0.17602.75 ▼59.1952.92 ▲0.16
Media Library /wp-admin/upload.php1,391 ▼94.25 ▲0.09101.81 ▲0.8244.41 ▲1.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hc-privacy-compactor/inc/class-hc-privacy-customizer.php:15

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No plugin tags provided

hc-privacy-compactor/privacy-compactor.php 92% from 13 tests

The main PHP script in "Compact Privacy Pages" version 1.1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("hc-privacy-compactor.php" instead of "privacy-compactor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin517 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP48411466
CSS11149
JavaScript2002

PHP code Passed 2 tests

An short overview of 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.39
Average class complexity15.00
▷ Minimum class complexity9.00
▷ Maximum class complexity20.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods15.26%
▷ Public methods1684.21%
▷ Protected methods00.00%
▷ Private methods315.79%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin