74% leseo

Code Review | LeSeo

WordPress plugin LeSeo scored74%from 54 tests.

About plugin

  • Plugin page: leseo
  • Plugin version: 0.4.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.1-6.2.2
  • WordPress version: 6.3.1
  • First release: May 31, 2023
  • Latest release: Jun 25, 2023
  • Number of updates: 4
  • Update frequency: every 6.3 days
  • Top authors: laobuluo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /115 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.67MB] [CPU: ▲8.58ms] Passed 4 tests

A check of server-side resources used by LeSeo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.13 ▲1.6745.93 ▲7.25
Dashboard /wp-admin4.98 ▲1.6755.02 ▲8.96
Posts /wp-admin/edit.php5.03 ▲1.6762.20 ▲15.68
Add New Post /wp-admin/post-new.php7.56 ▲1.67104.34 ▲2.41
Media Library /wp-admin/upload.php4.90 ▲1.6751.66 ▲16.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 164 new files
Database: no new tables, 7 new options
New WordPress options
_lezaiyun_leseo_option
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LeSeo
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲10413.21 ▼1.421.64 ▼0.0940.17 ▼8.13
Dashboard /wp-admin2,245 ▲575.80 ▼0.27111.52 ▲7.4652.80 ▲8.43
Posts /wp-admin/edit.php2,128 ▲392.05 ▲0.0439.87 ▼1.9445.75 ▲11.44
Add New Post /wp-admin/post-new.php1,573 ▲4418.68 ▲0.34649.45 ▲45.3756.33 ▲1.91
Media Library /wp-admin/upload.php1,430 ▲424.21 ▲0.03100.53 ▲1.8853.78 ▲8.84
SEO优化 /wp-admin/admin.php?page=lezaiyun-leseo-options#tab=seo%e4%bc%98%e5%8c%961,7253.8860.87155.72
基础优化 /wp-admin/admin.php?page=lezaiyun-leseo-options#tab=%e5%9f%ba%e7%a1%80%e4%bc%98%e5%8c%961,7433.5249.2781.71
功能优化 /wp-admin/admin.php?page=lezaiyun-leseo-options#tab=%e5%8a%9f%e8%83%bd%e4%bc%98%e5%8c%961,7433.4148.7669.58
搜索推送 /wp-admin/admin.php?page=lezaiyun-leseo-options#tab=%e6%90%9c%e7%b4%a2%e6%8e%a8%e9%80%811,7363.7350.6676.50
插件说明 /wp-admin/admin.php?page=lezaiyun-leseo-options#tab=%e6%8f%92%e4%bb%b6%e8%af%b4%e6%98%8e1,7253.7250.2056.96

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
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/leseo/leseo.php+243
    Undefined index: Delete
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/leseo/leseo-admin-options.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in leseo/assets to your readme.txt
Please take inspiration from this readme.txt

leseo/leseo.php Passed 13 tests

The main PHP file in "LeSeo" ver. 0.4.2 adds more information about the plugin and also serves as the entry point for this plugin
60 characters long description:
LeSeo,一个比较全面、免费的WordPress SEO插件。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin39,873 lines of code in 138 files:
LanguageFilesBlank linesComment linesLines of code
PHP913,6191,57416,261
JavaScript51,3004976,564
PO File203,1983,5916,500
Sass1697035,674
CSS43765094,872
SVG2002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity26.61
▷ Minimum class complexity1.00
▷ Maximum class complexity181.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes66
▷ Abstract classes23.03%
▷ Concrete classes6496.97%
▷ Final classes00.00%
Methods285
▷ Static methods4214.74%
▷ Public methods28499.65%
▷ Protected methods00.00%
▷ Private methods10.35%
Functions29
▷ Named functions2689.66%
▷ Anonymous functions310.34%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%
screenshot.png36.32KB2.97KB▼ 91.82%