84% future-posts-with-password

Code Review | Future Posts with password

WordPress plugin Future Posts with password scored84%from 54 tests.

About plugin

  • Plugin page: future-posts-with...
  • Plugin version: 1.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Aug 6, 2018
  • Number of updates: 9
  • Update frequency: every 87.6 days
  • Top authors: pablolopezmestre (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /649 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.47ms] Passed 4 tests

A check of server-side resources used by Future Posts with password
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.06 ▲0.58
Dashboard /wp-admin3.38 ▲0.0854.05 ▲1.99
Posts /wp-admin/edit.php3.50 ▲0.1450.57 ▲2.46
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.92 ▼13.50
Media Library /wp-admin/upload.php3.31 ▲0.0735.93 ▲1.05

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Future Posts with password
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.161.81 ▲0.0944.69 ▲3.45
Dashboard /wp-admin2,195 ▲185.63 ▲0.0199.06 ▲12.7944.07 ▼4.54
Posts /wp-admin/edit.php2,097 ▼02.14 ▲0.1735.73 ▲1.4137.64 ▼5.76
Add New Post /wp-admin/post-new.php1,526 ▼023.62 ▲0.51675.81 ▼61.9353.38 ▼9.73
Media Library /wp-admin/upload.php1,400 ▼04.19 ▲0.0996.38 ▼10.7648.63 ▼2.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/future-posts-with-password/includes/PublicFront/Show.php
    • > /wp-content/plugins/future-posts-with-password/includes/fpwp.php
    • > /wp-content/plugins/future-posts-with-password/future-posts-with-password.php
    • > /wp-content/plugins/future-posts-with-password/includes/Admin/Admin.php

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: password, review, future post, future

future-posts-with-password/future-posts-with-password.php 85% from 13 tests

The main PHP script in "Future Posts with password" version 1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 141 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
There were no executable files found in this plugin513 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP13122196477
PO File11,6553,67523
JSON20013

PHP code Passed 2 tests

This is a short overview 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.48
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods614.29%
▷ Public methods3480.95%
▷ Protected methods37.14%
▷ Private methods511.90%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants3
▷ Global constants3100.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
No PNG files were detected