83% webico-security-setting

Code Review | Webico Settings

WordPress plugin Webico Settings scored83%from 54 tests.

About plugin

  • Plugin page: webico-security-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Nov 1, 2018
  • Latest release: Nov 1, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: tranbinhcse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /489 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Webico Settings
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0142.66 ▼5.55
Dashboard /wp-admin3.57 ▼0.0649.89 ▼22.95
Posts /wp-admin/edit.php3.69 ▲0.0148.91 ▼5.19
Add New Post /wp-admin/post-new.php6.16 ▲0.0189.76 ▼15.90
Media Library /wp-admin/upload.php3.50 ▲0.0135.35 ▲1.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Webico Settings
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,585 ▼16114.23 ▼0.131.69 ▼0.2441.01 ▼2.09
Dashboard /wp-admin2,013 ▼1675.52 ▼0.1784.21 ▼10.3139.03 ▼8.41
Posts /wp-admin/edit.php1,928 ▼1722.03 ▲0.0335.50 ▲0.4233.83 ▼1.66
Add New Post /wp-admin/post-new.php1,411 ▼12023.12 ▲0.08675.02 ▲67.9855.84 ▼6.18
Media Library /wp-admin/upload.php1,231 ▼1694.17 ▼0.0898.66 ▼5.0843.83 ▼2.73

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webico-security-setting/inc/security.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webico-security-setting/inc/permission.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/webico-security-setting/inc/template.php:53

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: webico, webico settings

webico-security-setting/wbc-setting.php 69% from 13 tests

The main PHP file in "Webico Settings" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires PHP: Required version does not match the one declared in readme.txt ("5.6.30" instead of "5.6")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("webico-security-setting.php" instead of "wbc-setting.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected97 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5182597

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo.png5.30KB2.99KB▼ 43.67%
assets/icon.png1.97KB1.17KB▼ 40.41%