83% smntcs-private-site

Code Review | SMNTCS Private Site

WordPress plugin SMNTCS Private Site scored83%from 54 tests.

About plugin

  • Plugin page: smntcs-private-site
  • Plugin version: 1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-6.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2018
  • Latest release: Dec 3, 2022
  • Number of updates: 19
  • Update frequency: every 95.8 days
  • Top authors: nielslange (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,668 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.41ms] Passed 4 tests

An overview of server-side resources used by SMNTCS Private Site
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.75 ▼0.02
Dashboard /wp-admin3.35 ▲0.0044.04 ▼17.57
Posts /wp-admin/edit.php3.40 ▲0.0448.12 ▲0.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.02 ▼8.64
Media Library /wp-admin/upload.php3.28 ▲0.0433.99 ▲0.61

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

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

Browser metrics Passed 4 tests

Checking browser requirements for SMNTCS Private Site
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼1.034.74 ▲3.1638.89 ▼0.37
Dashboard /wp-admin2,203 ▲155.77 ▼0.0999.50 ▼5.3740.32 ▼5.27
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0039.43 ▲1.4934.78 ▼1.45
Add New Post /wp-admin/post-new.php1,535 ▲1623.06 ▼0.53670.84 ▲4.7949.80 ▼5.40
Media Library /wp-admin/upload.php1,388 ▼04.28 ▲0.1196.66 ▼3.5143.98 ▲1.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/smntcs-private-site/template/private-site.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: The official readme.txt is a good inspiration

smntcs-private-site/smntcs-smntcs-private-site.php 85% from 13 tests

The entry point to "SMNTCS Private Site" version 1.8 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smntcs-private-site.php" instead of "smntcs-smntcs-private-site.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
No dangerous file extensions were detected4,825 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JSON1004,549
PHP22544178
XML1141450
Markdown123035
YAML1009
JavaScript1024

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions4
▷ Named functions4100.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
No PNG files were detected