89% wp-secure-content

Code Review | WP Secure Content

WordPress plugin WP Secure Content scored89%from 54 tests.

About plugin

  • Plugin page: wp-secure-content
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 16, 2014
  • Latest release: May 24, 2023
  • Number of updates: 32
  • Update frequency: every 97.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /5,772 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: ▼3.53ms] Passed 4 tests

Analyzing server-side resources used by WP Secure Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1634.76 ▼8.89
Dashboard /wp-admin3.34 ▲0.0352.92 ▲1.12
Posts /wp-admin/edit.php3.39 ▲0.0348.16 ▲1.81
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.32 ▼8.17
Media Library /wp-admin/upload.php3.26 ▲0.0337.63 ▲3.54
WP SC /wp-admin/options-general.php?page=wp_sc3.2533.76

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WP Secure Content
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18913.61 ▼1.035.68 ▲3.6936.93 ▼16.13
Dashboard /wp-admin2,214 ▲264.86 ▼0.0198.78 ▼10.9637.69 ▼6.65
Posts /wp-admin/edit.php2,097 ▲82.02 ▼0.0039.47 ▲4.1135.72 ▲2.85
Add New Post /wp-admin/post-new.php1,521 ▲217.86 ▼5.67643.50 ▼52.8759.71 ▼10.55
Media Library /wp-admin/upload.php1,393 ▲24.36 ▲0.05101.18 ▼2.2544.21 ▼1.30
WP SC /wp-admin/options-general.php?page=wp_sc8132.0726.5336.56

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Everything seems fine, however this is by no means an exhaustive test

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #2 (Create a new directory named `wp-secure-content` in the `wp-content/plugins` directory of your WordPress installation. Use an FTP or SFTP client to upload the contents of your plugin archive to the new directory that you just created on your web host.), #3 (Log in to the WordPress Dashboard and activate the WP Secure Content plugin.), #4 (Once the plugin is activated, a new **WP Secure Content** sub-menu will appear in your Wordpress admin -> settings menu.)
You can look at the official readme.txt

wp-secure-content/index.php 77% from 13 tests

The main file in "WP Secure Content" v. 1.1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-secure-content.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 158 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected311 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP39019175
PO File32727102
JavaScript14131
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin