10% code-analyzer

Code Review | Code Analyzer

WordPress plugin Code Analyzer scored10%from 54 tests.

About plugin

  • Plugin page: code-analyzer
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Aug 22, 2015
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: evilkitteh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,636 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Database::plugin_activation() should not be called statically

Server metrics [RAM: ▲0.11MB] [CPU: ▼3.60ms] Passed 4 tests

Server-side resources used by Code Analyzer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.66 ▼5.23
Dashboard /wp-admin3.45 ▲0.1450.73 ▼2.24
Posts /wp-admin/edit.php3.56 ▲0.2148.33 ▼4.87
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.16 ▼2.05
Media Library /wp-admin/upload.php3.37 ▲0.1439.15 ▲5.45
Code Analyzer /wp-admin/options-general.php?page=code-analyzer3.3435.12

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Code Analyzer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.131.88 ▲0.1842.07 ▼2.72
Dashboard /wp-admin2,202 ▲225.63 ▼0.0485.48 ▼10.7842.78 ▲2.93
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0335.62 ▼2.9736.38 ▲1.09
Add New Post /wp-admin/post-new.php1,538 ▲1018.34 ▼4.61647.45 ▼35.6351.34 ▼15.08
Media Library /wp-admin/upload.php1,404 ▲74.20 ▲0.02103.08 ▲2.1243.31 ▲1.42
Code Analyzer /wp-admin/options-general.php?page=code-analyzer8432.0321.5230.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Database::plugin_deactivation() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
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
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === code-analyzer === )
The official readme.txt is a good inspiration

code-analyzer/code-analyzer.php Passed 13 tests

The primary PHP file in "Code Analyzer" version 0.2 is used by WordPress to initiate all plugin functionality
78 characters long description:
Simple search tool using regular expressions to find unwanted code in plugins.

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 plugin763 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP5147131680
CSS118183

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity22.75
▷ Minimum class complexity2.00
▷ Maximum class complexity58.00
Average method complexity3.49
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods2674.29%
▷ Protected methods00.00%
▷ Private methods925.71%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin