84% wppao-sitemap

Code Review | Wppao Sitemap

WordPress plugin Wppao Sitemap scored84%from 54 tests.

About plugin

  • Plugin page: wppao-sitemap
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 9, 2020
  • Latest release: May 26, 2020
  • Number of updates: 4
  • Update frequency: every 4.3 days
  • Top authors: mryuanshu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

6,000+ active /12,161 total downloads

Benchmarks

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.14MB] [CPU: ▼2.10ms] Passed 4 tests

This is a short check of server-side resources used by Wppao Sitemap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1344.37 ▲1.62
Dashboard /wp-admin3.44 ▲0.1459.64 ▲6.64
Posts /wp-admin/edit.php3.56 ▲0.2054.15 ▲3.68
Add New Post /wp-admin/post-new.php6.03 ▲0.1488.16 ▼15.68
Media Library /wp-admin/upload.php3.37 ▲0.1439.55 ▲1.97
网站地图调试 /wp-admin/admin.php?page=wppaositemap_helper3.3333.93
WP泡网站地图 /wp-admin/admin.php?page=wppaositemap3.3840.16

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wppao Sitemap
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.25 ▲0.121.72 ▼0.0343.57 ▼0.45
Dashboard /wp-admin2,209 ▲295.53 ▼0.1285.02 ▼13.8082.64 ▲43.99
Posts /wp-admin/edit.php2,136 ▲362.04 ▲0.0938.63 ▼1.8644.23 ▲8.46
Add New Post /wp-admin/post-new.php1,563 ▲3723.33 ▲0.33739.94 ▲94.6558.47 ▼0.65
Media Library /wp-admin/upload.php1,420 ▲204.12 ▼0.0798.67 ▼8.0472.33 ▲25.89
网站地图调试 /wp-admin/admin.php?page=wppaositemap_helper8291.9922.4759.29
WP泡网站地图 /wp-admin/admin.php?page=wppaositemap1,1983.2644.39298.10

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wppsmp_get_setting() in wp-content/plugins/wppao-sitemap/module/baidu-zd.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wppsmp_get_setting() in wp-content/plugins/wppao-sitemap/module/auto.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wppsmp_get_setting() in wp-content/plugins/wppao-sitemap/module/js-ts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wppao-sitemap/options/initialization.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention: The official readme.txt is a good inspiration

wppao-sitemap/wppao-sitemap.php Passed 13 tests

"Wppao Sitemap" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
89 characters long description:
生成网站SEO所需要的Sitemap网站地图,支持xml和html格式的网站地图。

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
Success! There were no dangerous files found in this plugin1,079 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1211883747
CSS1290182
JavaScript2102110
HTML10040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity48.50
▷ Minimum class complexity4.00
▷ Maximum class complexity93.00
Average method complexity8.92
▷ Minimum method complexity1.00
▷ Maximum method complexity65.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods975.00%
▷ Protected methods00.00%
▷ Private methods325.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
options/images/qun.png1.78KB1.74KB▼ 2.46%
imgs/plugin_icon.png0.67KB0.70KB0.00%
options/images/qqmail.png1.81KB1.76KB▼ 2.70%