10% thebrent-private-site

Code Review | Private Sites

WordPress plugin Private Sites scored10%from 54 tests.

About plugin

  • Plugin page: thebrent-private-...
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.11
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Mar 31, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: thebrent (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,659 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Parse error in wp-content/plugins/thebrent-private-site/private-site.php+95
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.85ms] Passed 4 tests

Analyzing server-side resources used by Private Sites
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.47 ▼6.42
Dashboard /wp-admin3.31 ▲0.0047.73 ▼1.33
Posts /wp-admin/edit.php3.36 ▲0.0052.13 ▲2.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.32 ▲3.05
Media Library /wp-admin/upload.php3.23 ▲0.0037.73 ▲1.39

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Private Sites: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.071.71 ▲0.0642.77 ▲4.76
Dashboard /wp-admin2,206 ▲185.85 ▲0.03100.58 ▼8.1744.96 ▼0.42
Posts /wp-admin/edit.php2,089 ▼32.05 ▼0.0140.07 ▲1.7137.31 ▲0.71
Add New Post /wp-admin/post-new.php1,524 ▲523.21 ▲0.28648.98 ▼34.3166.19 ▲4.86
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.1396.58 ▼9.9742.74 ▲0.37

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/thebrent-private-site/private-site.php on line 95

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: multisite, private site, network

thebrent-private-site/private-site.php 92% from 13 tests

The primary PHP file in "Private Sites" version 0.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("thebrent-private-site.php" instead of "private-site.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin85 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111272
Markdown110013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin