10% safly-article-lock

Code Review | SaFly Article Lock

WordPress plugin SaFly Article Lock scored10%from 54 tests.

About plugin

  • Plugin page: safly-article-lock
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 16, 2018
  • Latest release: Oct 16, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: safly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/safly-article-lock/safly-article-lock.php+29
    Undefined index: SaFly_AL

Server metrics [RAM: ▼1.97MB] [CPU: ▼59.46ms] Passed 4 tests

An overview of server-side resources used by SaFly Article Lock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.40 ▼31.95
Dashboard /wp-admin2.05 ▼1.304.95 ▼57.91
Posts /wp-admin/edit.php2.05 ▼1.315.07 ▼45.54
Add New Post /wp-admin/post-new.php2.05 ▼3.845.47 ▼102.45
Media Library /wp-admin/upload.php2.05 ▼1.185.52 ▼26.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SaFly Article Lock
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▲0.072.09 ▲0.4842.91 ▲5.85
Dashboard /wp-admin2,195 ▲185.54 ▼0.1287.10 ▲2.7837.44 ▼5.32
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0333.55 ▼4.0633.15 ▼2.22
Add New Post /wp-admin/post-new.php1,526 ▼823.23 ▲5.06663.66 ▲57.1555.39 ▼13.59
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.1293.74 ▼7.0743.29 ▼2.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/safly-article-lock/safly-article-lock.php+29
    Undefined index: SaFly_AL
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/safly-article-lock/safly-article-lock.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: article, lock, safly, archive

safly-article-lock/safly-article-lock.php Passed 13 tests

The primary PHP file in "SaFly Article Lock" version 1.0.0 is used by WordPress to initiate all plugin functionality
77 characters long description:
A plug-in helps you disable the access to the articles in an appointed range.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21533115

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.86
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%
Functions3
▷ Named functions3100.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
No PNG files were detected