84% icey-only-logged-in

Code Review | Icey - Only logged in

WordPress plugin Icey - Only logged in scored84%from 54 tests.

About plugin

  • Plugin page: icey-only-logged-in
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Feb 17, 2023
  • Number of updates: 12
  • Update frequency: every 1.9 days
  • Top authors: icedor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /765 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.92ms] Passed 4 tests

This is a short check of server-side resources used by Icey - Only logged in
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.87 ▲4.58
Dashboard /wp-admin3.32 ▲0.0147.63 ▼6.19
Posts /wp-admin/edit.php3.37 ▲0.0150.02 ▼4.50
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.50 ▼16.87
Media Library /wp-admin/upload.php3.24 ▲0.0137.51 ▼0.13
Icey - Only logged in /wp-admin/options-general.php?page=icey_-_only_logged_in3.2033.49

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Icey - Only logged in: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.32 ▼1.231.92 ▼0.1342.93 ▼0.64
Dashboard /wp-admin2,210 ▲255.80 ▼0.06101.53 ▼8.5239.88 ▼4.57
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0235.58 ▼3.4236.15 ▲3.10
Add New Post /wp-admin/post-new.php1,517 ▼2517.83 ▼0.37672.64 ▼32.5349.72 ▼5.08
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.02106.31 ▼0.7044.97 ▲0.38
Icey - Only logged in /wp-admin/options-general.php?page=icey_-_only_logged_in7872.0326.7930.26

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, 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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/icey-only-logged-in/icey-only-logged-in.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
1 plugin tags: authentication login protect development

icey-only-logged-in/icey-only-logged-in.php Passed 13 tests

The main PHP file in "Icey - Only logged in" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
66 characters long description:
Only logged-in users can view the site or REST API when activated.

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
No dangerous file extensions were detected174 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2128174

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin