83% wp-smart-content-protection

Code Review | WP Smart Content Protection

WordPress plugin WP Smart Content Protection scored83%from 54 tests.

About plugin

  • Plugin page: wp-smart-content-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 6, 2018
  • Latest release: Dec 10, 2018
  • Number of updates: 24
  • Update frequency: every 12.9 days
  • Top authors: creativeagency (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /2,028 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 gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼0.93ms] Passed 4 tests

Server-side resources used by WP Smart Content Protection
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.91 ▲1.45
Dashboard /wp-admin3.34 ▲0.0344.92 ▼1.13
Posts /wp-admin/edit.php3.39 ▲0.0348.24 ▲0.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.37 ▼4.49
Media Library /wp-admin/upload.php3.26 ▲0.0338.57 ▲4.49

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
wpscp_right_click
wpscp_paste
db_upgraded
wpscp_cut
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
wpscp_copy
widget_recent-posts

Browser metrics Passed 4 tests

WP Smart Content Protection: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7314.77 ▲0.011.97 ▲0.3243.70 ▲2.63
Dashboard /wp-admin2,222 ▲374.82 ▼1.07111.61 ▲12.9442.56 ▲1.59
Posts /wp-admin/edit.php2,102 ▲162.03 ▲0.0636.89 ▼1.1132.91 ▲0.36
Add New Post /wp-admin/post-new.php1,527 ▼817.36 ▼5.76665.87 ▼29.0662.61 ▲1.45
Media Library /wp-admin/upload.php1,398 ▲164.13 ▼0.02103.44 ▲6.0143.24 ▼1.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • wpscp_copy
    • wpscp_cut
    • wpscp_right_click
    • widget_recent-posts
    • wpscp_paste

Smoke tests 75% from 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)
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/wp-smart-content-protection/page/setting.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-smart-content-protection/wp-smart-content-protection.php:217

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 75% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tested up to: Invalid version format
  • Requires at least: Invalid version format
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Please add an image for screenshot #1 (screenshot-1.png)
You can look at the official readme.txt

wp-smart-content-protection/wp-smart-content-protection.php 85% from 13 tests

The primary PHP file in "WP Smart Content Protection" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 305 characters long)
  • Text Domain: The text domain should only use lowercase characters and dashes

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
There were no executable files found in this plugin126 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP39737126

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.23KB19.01KB▼ 61.39%