84% sharable-password-protected-posts

Code Review | Sharable Password Protected Posts

WordPress plugin Sharable Password Protected Posts scored84%from 54 tests.

About plugin

  • Plugin page: sharable-password...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 2, 2022
  • Latest release: Aug 2, 2023
  • Number of updates: 12
  • Update frequency: every 22.8 days
  • Top authors: gaambo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,009 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.00ms] Passed 4 tests

Analyzing server-side resources used by Sharable Password Protected Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.02 ▼6.49
Dashboard /wp-admin3.34 ▲0.0445.89 ▼7.41
Posts /wp-admin/edit.php3.39 ▲0.0346.95 ▼6.71
Add New Post /wp-admin/post-new.php5.87 ▼0.0294.36 ▼7.38
Media Library /wp-admin/upload.php3.26 ▲0.0338.00 ▲4.60

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Sharable Password Protected Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.311.71 ▼0.0240.60 ▼2.97
Dashboard /wp-admin2,198 ▲185.64 ▲0.0095.31 ▼1.7641.55 ▲2.41
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0233.87 ▼7.1432.51 ▼4.14
Add New Post /wp-admin/post-new.php1,694 ▲16322.83 ▼0.49660.90 ▲15.3664.25 ▲3.96
Media Library /wp-admin/upload.php1,397 ▼34.31 ▲0.0999.97 ▼10.5043.78 ▼1.48

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SPPP\\add_action() in wp-content/plugins/sharable-password-protected-posts/sharable-password-protected-posts.php:58

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: share private, password protected, secret links

sharable-password-protected-posts/sharable-password-protected-posts.php Passed 13 tests

The main PHP file in "Sharable Password Protected Posts" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
46 characters long description:
Share password protected posts via secret URLs

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected420 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP23490186
JavaScript6289175
PO File181032
Sass15126
CSS1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
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
Namespaces1
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%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin