78% taobao-catalog-parser

Code Review | Taobao Catalog

WordPress plugin Taobao Catalog scored78%from 54 tests.

About plugin

  • Plugin page: taobao-catalog-pa...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.2
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Sep 23, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: vit_sh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,219 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.98ms] Passed 4 tests

Analyzing server-side resources used by Taobao Catalog
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0345.22 ▲4.25
Dashboard /wp-admin3.34 ▲0.0450.27 ▼5.08
Posts /wp-admin/edit.php3.39 ▲0.0346.00 ▼9.89
Add New Post /wp-admin/post-new.php5.93 ▲0.0385.29 ▼16.14
Media Library /wp-admin/upload.php3.27 ▲0.0341.12 ▲3.18

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Taobao Catalog
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.28 ▼0.072.10 ▲0.1743.40 ▼1.34
Dashboard /wp-admin2,215 ▲355.57 ▼0.0793.69 ▲5.4841.47 ▼0.97
Posts /wp-admin/edit.php2,120 ▲172.01 ▲0.0438.34 ▲1.0337.04 ▼3.60
Add New Post /wp-admin/post-new.php1,547 ▲2123.14 ▼0.28676.51 ▼69.0555.19 ▼3.45
Media Library /wp-admin/upload.php1,420 ▲204.23 ▲0.07102.11 ▼3.8042.17 ▼3.60
Taobao Catalog Settings /wp-admin/taobao.php260.420.1514.92

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 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/taobao-catalog-parser/taobao.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/taobao.php
    • > Network (severe)
    wp-admin/taobao.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt might help

taobao-catalog-parser/taobao.php 92% from 13 tests

"Taobao Catalog" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("taobao-catalog-parser.php" instead of "taobao.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin235 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP211011235

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity3.50
▷ Minimum method complexity3.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods150.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
4 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png73.92KB36.17KB▼ 51.07%
screenshot-4.png15.31KB9.39KB▼ 38.67%
screenshot-1.png23.05KB11.76KB▼ 49.00%
screenshot-2.png14.34KB7.77KB▼ 45.80%