78% easy-content-protector

Code Review | Easy Content Protector

WordPress plugin Easy Content Protector scored78%from 54 tests.

About plugin

  • Plugin page: easy-content-prot...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2022
  • Latest release: Mar 23, 2022
  • Number of updates: 11
  • Update frequency: every 0.5 days
  • Top authors: plugindeveloper (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,345 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.04MB] [CPU: ▼4.92ms] Passed 4 tests

An overview of server-side resources used by Easy Content Protector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.11 ▼2.26
Dashboard /wp-admin3.35 ▲0.0546.38 ▼4.77
Posts /wp-admin/edit.php3.40 ▲0.0446.72 ▼1.88
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.83 ▼10.77
Media Library /wp-admin/upload.php3.27 ▲0.0435.56 ▲1.97
Content Protector /wp-admin/options-general.php?page=easy-content-protector3.2432.82

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Content Protector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲20014.06 ▼0.345.86 ▲4.2138.65 ▼11.02
Dashboard /wp-admin2,213 ▲245.89 ▲0.96107.70 ▼15.9242.72 ▼1.44
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0839.22 ▼2.1935.61 ▼4.00
Add New Post /wp-admin/post-new.php1,537 ▼523.11 ▲4.36595.18 ▼34.7954.54 ▼6.04
Media Library /wp-admin/upload.php1,389 ▲74.11 ▼0.1097.99 ▼0.2240.29 ▼3.97
Content Protector /wp-admin/options-general.php?page=easy-content-protector9082.0625.0326.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-content-protector/easy-content-protector.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Easy_Content_Protector\\Inc\\Classes\\Setting' not found in wp-content/plugins/easy-content-protector/inc/options/settings.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in easy-content-protector/assets to your readme.txt
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

easy-content-protector/easy-content-protector.php Passed 13 tests

The primary PHP file in "Easy Content Protector" version 1.0.1 is used by WordPress to initiate all plugin functionality
34 characters long description:
Simple way to protect your content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected899 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP14182151627
JavaScript2608104
Sass210091
CSS671777

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity9.80
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods38
▷ Static methods00.00%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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