83% main-entrance

Code Review | Main Entrance

WordPress plugin Main Entrance scored83%from 54 tests.

About plugin

  • Plugin page: main-entrance
  • Plugin version: 1.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Apr 7, 2020
  • Latest release: Aug 4, 2023
  • Number of updates: 29
  • Update frequency: every 41.9 days
  • Top authors: Christian Gatti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,681 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.16ms] Passed 4 tests

Server-side resources used by Main Entrance
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1237.50 ▲1.76
Dashboard /wp-admin3.43 ▲0.1345.75 ▼1.83
Posts /wp-admin/edit.php3.48 ▲0.1248.39 ▲0.45
Add New Post /wp-admin/post-new.php6.03 ▲0.1479.99 ▼17.01
Media Library /wp-admin/upload.php3.35 ▲0.1238.20 ▲5.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Main Entrance
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.62 ▼0.765.18 ▲3.6340.91 ▲0.07
Dashboard /wp-admin2,223 ▲355.85 ▲0.95105.94 ▼15.8739.38 ▼6.96
Posts /wp-admin/edit.php2,109 ▲172.06 ▼0.0640.81 ▲2.1934.73 ▼1.62
Add New Post /wp-admin/post-new.php1,531 ▼423.30 ▼0.02666.34 ▲11.7449.16 ▼8.17
Media Library /wp-admin/upload.php1,408 ▲174.26 ▲0.0699.27 ▼2.5141.77 ▼1.72

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 20× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_login_form.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_check_resetpassword.php
    • > /wp-content/plugins/main-entrance/includes/mnnt_dependencies.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_register_form.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_check_login.php
    • > /wp-content/plugins/main-entrance/admin/mnnt_options_save.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_resetpassword_form_check.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_check_lostpassword.php
    • > /wp-content/plugins/main-entrance/public/includes/mnnt_lostpassword_form.php
    • > /wp-content/plugins/main-entrance/admin/mnnt_options_content.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires php: The plugin version is formatted incorrectly
You can look at the official readme.txt

main-entrance/main-entrance.php 85% from 13 tests

"Main Entrance" version 1.9.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin3,852 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP222,6062953,532
CSS26610212
JavaScript2419108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions58
▷ Named functions58100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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