90% wp-code-protection

Code Review | Source Code Protection

WordPress plugin Source Code Protection scored90%from 54 tests.

About plugin

  • Plugin page: wp-code-protection
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Feb 6, 2019
  • Latest release: Apr 5, 2023
  • Number of updates: 22
  • Update frequency: every 69.0 days
  • Top authors: mitalideva (63.64%)viitorcloudvc (40.91%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,107 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.73ms] Passed 4 tests

An overview of server-side resources used by Source Code Protection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.75 ▲1.76
Dashboard /wp-admin3.31 ▲0.0147.04 ▼0.01
Posts /wp-admin/edit.php3.36 ▲0.0143.75 ▼5.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.96 ▼10.69
Media Library /wp-admin/upload.php3.24 ▲0.0138.60 ▲2.96

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Source Code Protection
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲6813.19 ▼1.204.88 ▲3.2642.89 ▲1.24
Dashboard /wp-admin2,209 ▲214.86 ▼0.00103.06 ▼7.4546.33 ▲4.73
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.1237.20 ▼0.8331.88 ▼4.70
Add New Post /wp-admin/post-new.php1,520 ▼823.30 ▲5.16655.63 ▲16.7853.79 ▼7.87
Media Library /wp-admin/upload.php1,385 ▼04.24 ▲0.04110.54 ▲6.9146.89 ▲3.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: x, and p, security, s, c...

wp-code-protection/source-code-protection.php 92% from 13 tests

The entry point to "Source Code Protection" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-code-protection.php" instead of "source-code-protection.php")

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
Success! There were no dangerous files found in this plugin64 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2136664

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
There are no PNG files in this plugin