84% nucuta-password-protect

Code Review | Nucuta Password Protect

WordPress plugin Nucuta Password Protect scored84%from 54 tests.

About plugin

  • Plugin page: nucuta-password-p...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.30+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 23, 2017
  • Latest release: Oct 23, 2017
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: cuta (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Server-side resources used by Nucuta Password Protect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.91 ▲7.07
Dashboard /wp-admin3.33 ▲0.0246.63 ▲0.30
Posts /wp-admin/edit.php3.38 ▲0.0240.81 ▼6.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.80 ▼0.96
Media Library /wp-admin/upload.php3.25 ▲0.0235.76 ▲5.11

Server storage [IO: ▲0.02MB] [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: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
nucuta_pp_url
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Nucuta Password Protect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.17 ▼0.201.85 ▲0.1744.82 ▼0.50
Dashboard /wp-admin2,196 ▲265.61 ▼0.0695.10 ▼6.0643.96 ▲6.67
Posts /wp-admin/edit.php2,104 ▲71.97 ▼0.0536.64 ▼1.6032.61 ▼1.08
Add New Post /wp-admin/post-new.php1,529 ▲322.94 ▼0.38702.01 ▲20.9157.72 ▼4.32
Media Library /wp-admin/upload.php1,401 ▲44.12 ▼0.12123.46 ▲17.2350.81 ▲5.41
Nucuta Password Protect /wp-admin/options-general.php?page=Nucuta Password Protect8842.0030.5336.15

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: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • nucuta_pp_url
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/nucuta-password-protect/admin_page_html.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: protect, login, member, password protection, password...

nucuta-password-protect/nucuta_pass_protect.php 92% from 13 tests

The entry point to "Nucuta Password Protect" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nucuta-password-protect.php" instead of "nucuta_pass_protect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin359 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9639359

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
become_a_patron_button_nucuta.com.png6.42KB2.90KB▼ 54.81%