89% inn-ao-detector

Code Review | INN 主题环境检测器 (INN Theme Detector)

WordPress plugin INN 主题环境检测器 (INN Theme Detector) scored89%from 54 tests.

About plugin

  • Plugin page: inn-ao-detector
  • Plugin version: 12.1.0
  • PHP compatiblity: 5.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.11-6.0.99
  • WordPress version: 6.3.1
  • First release: Feb 19, 2018
  • Latest release: Dec 15, 2022
  • Number of updates: 27
  • Update frequency: every 65.2 days
  • Top authors: kmvan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.33MB] [CPU: ▼6.55ms] Passed 4 tests

An overview of server-side resources used by INN 主题环境检测器 (INN Theme Detector)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3538.16 ▼1.48
Dashboard /wp-admin3.64 ▲0.3045.08 ▼15.22
Posts /wp-admin/edit.php3.76 ▲0.4047.33 ▲2.38
Add New Post /wp-admin/post-new.php6.23 ▲0.3488.76 ▼7.96
Media Library /wp-admin/upload.php3.57 ▲0.3434.12 ▼1.55

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

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

Browser metrics Passed 4 tests

INN 主题环境检测器 (INN Theme Detector): an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.19 ▼1.191.88 ▲0.1840.57 ▲1.37
Dashboard /wp-admin2,206 ▲185.91 ▲1.03101.34 ▼2.0539.89 ▼3.63
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.12 ▲3.2335.89 ▲1.01
Add New Post /wp-admin/post-new.php1,538 ▲1823.17 ▼0.12579.98 ▼100.0948.81 ▼13.01
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.0194.29 ▼15.9543.73 ▼6.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === inn-ao-detector === )
The official readme.txt might help

inn-ao-detector/inn-ao-detector.php 92% from 13 tests

The main file in "INN 主题环境检测器 (INN Theme Detector)" v. 12.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected38 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP10738

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity59.00
▷ Minimum class complexity59.00
▷ Maximum class complexity59.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods29
▷ Static methods00.00%
▷ Public methods310.34%
▷ Protected methods00.00%
▷ Private methods2689.66%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.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
There are no PNG files in this plugin