83% 51la-analysis

Code Review | 51la Analysis

WordPress plugin 51la Analysis scored 83% from 54 tests.

About plugin

  • Plugin page: 51la-analysis
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 5.9.2
  • First release: Jan 29, 2022
  • Latest release: Mar 23, 2022
  • Number of updates: 16
  • Update frequency: every 3.4 days
  • Top authors: 51la (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 803 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼302.75ms] Passed 4 tests

Analyzing server-side resources used by 51la Analysis
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0357.93 ▲5.78
Dashboard /wp-admin3.44 ▲0.0333.25 ▼2.77
Posts /wp-admin/edit.php3.67 ▲0.0236.37 ▼2.31
Add New Post /wp-admin/post-new.php6.90 ▼0.0794.32 ▼1,205.48
Media Library /wp-admin/upload.php3.32 ▲0.0224.76 ▼0.42
51LA网站统计 /wp-admin/options-general.php?page=51la-analysis-settings3.3122.19

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 2 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by 51la Analysis
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,788 ▲3416.17 ▲0.166.65 ▲0.912.43 ▼0.30
Dashboard /wp-admin2,897 ▲396.15 ▼0.11119.32 ▼12.63167.80 ▲7.06
Posts /wp-admin/edit.php2,696 ▲113.23 ▼0.0162.30 ▼6.56151.05 ▲11.56
Add New Post /wp-admin/post-new.php1,755 ▲8421.55 ▼0.03465.59 ▲55.61157.47 ▼1.75
Media Library /wp-admin/upload.php1,703 ▲55.54 ▲0.01144.06 ▼3.69192.11 ▲7.19
51LA网站统计 /wp-admin/options-general.php?page=51la-analysis-settings1,2132.3961.45228.95

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 2 options
    • _51la_site_imoport_type_
    • _51la_site_version_

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/51la-analysis/index.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: 51la

51la-analysis/index.php 77% from 13 tests

This is the main PHP file of "51la Analysis" version 1.0.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("51la-analysis.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 377 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected214 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
4 PNG files occupy 0.30MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/static/v5-id.png74.09KB24.92KB▼ 66.36%
admin/static/v5-label.png99.97KB22.90KB▼ 77.09%
admin/static/v6-label.png72.00KB20.97KB▼ 70.87%
admin/static/v6-id.png60.95KB19.85KB▼ 67.44%