79% mc-protected-page-upgrade

Code Review | MC Protected Page Upgrade

WordPress plugin MC Protected Page Upgrade scored79%from 54 tests.

About plugin

  • Plugin page: mc-protected-page...
  • Plugin version: 2.5.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 25, 2020
  • Latest release: Jun 13, 2022
  • Number of updates: 20
  • Update frequency: every 32.9 days
  • Top authors: Mike Hickcox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.11ms] Passed 4 tests

An overview of server-side resources used by MC Protected Page Upgrade
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.70 ▲0.49
Dashboard /wp-admin3.34 ▲0.0451.26 ▼0.50
Posts /wp-admin/edit.php3.39 ▲0.0447.29 ▼4.08
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.04 ▼16.35
Media Library /wp-admin/upload.php3.26 ▲0.0438.69 ▲0.82
MC Protected Page Upgrade /wp-admin/options-general.php?page=mc6397-page-pwd-duration3.2331.46

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_recent-posts
mc6397ppu_duration_minutes
widget_recent-comments
widget_theysaidso_widget
mc6397ppu_duration_seconds
mc6397ppu_duration_hours
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

MC Protected Page Upgrade: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.481.78 ▼0.1044.15 ▼1.45
Dashboard /wp-admin2,199 ▲225.62 ▲0.0093.04 ▼4.5742.68 ▲0.29
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0036.34 ▼2.7735.62 ▼0.12
Add New Post /wp-admin/post-new.php1,529 ▼823.01 ▲4.42657.66 ▲3.6152.86 ▼28.16
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.0299.00 ▼6.9742.85 ▼4.48
MC Protected Page Upgrade /wp-admin/options-general.php?page=mc6397-page-pwd-duration8452.1424.0728.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mc-protected-page-upgrade/mc-protected-page-upgrade.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc-protected-page-upgrade/inc/mc6397ppu_update-form.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: password protect, password duration, page password, password, cookie duration...

mc-protected-page-upgrade/mc-protected-page-upgrade.php Passed 13 tests

The main PHP script in "MC Protected Page Upgrade" version 2.5.3 is automatically included on every request by WordPress
137 characters long description:
Set the time allowed before a password must be again entered for a password-protected post or page. Also enhances the page password form.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected22 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP321322

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/padlock.png20.85KB7.16KB▼ 65.66%