68% private-website-intranet

Code Review | Private Site with Custom Login Page

WordPress plugin Private Site with Custom Login Page scored68%from 54 tests.

About plugin

  • Plugin page: private-website-i...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Jul 20, 2017
  • Latest release: Jul 24, 2017
  • Number of updates: 24
  • Update frequency: every 4.1 days
  • Top authors: joaorosa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,435 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.23MB] [CPU: ▼40.31ms] Passed 4 tests

Analyzing server-side resources used by Private Site with Custom Login Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7213.74 ▼26.61
Dashboard /wp-admin2.78 ▼0.5316.09 ▼31.44
Posts /wp-admin/edit.php2.78 ▼0.5819.03 ▼26.58
Add New Post /wp-admin/post-new.php2.78 ▼3.1116.78 ▼76.62
Media Library /wp-admin/upload.php2.78 ▼0.4515.71 ▼20.82

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Private Site with Custom Login Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲17113.62 ▼0.765.34 ▲3.5637.90 ▲0.40
Dashboard /wp-admin2,223 ▲354.83 ▼0.23113.40 ▲10.1141.92 ▼2.84
Posts /wp-admin/edit.php2,109 ▲172.06 ▲0.0236.68 ▼4.3436.16 ▼0.03
Add New Post /wp-admin/post-new.php1,550 ▲1623.39 ▲0.31674.80 ▲10.5956.80 ▼10.96
Media Library /wp-admin/upload.php1,408 ▲174.21 ▼0.0092.24 ▼5.7140.92 ▼3.05

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-includes/link-template.php+445
    Trying to get property 'ID' of non-object
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/private-website-intranet/public/partials/private-website-intranet-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/private-website-intranet/public/class-private-website-intranet-public.php:186
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_login_form() in wp-content/plugins/private-website-intranet/public/partials/private-website-intranet-public-login-shortcode.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/private-website-intranet/admin/partials/private-website-intranet-admin-display.php:19

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 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
Please take inspiration from this readme.txt

private-website-intranet/private-website-intranet.php 92% from 13 tests

This is the main PHP file of "Private Site with Custom Login Page" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 320 characters long)

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
There were no executable files found in this plugin443 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13176543364
PO File2141468
JavaScript24546
CSS2195

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity2.57
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin