10% lmwd-ziptree

Code Review | LMWD Tree Zip

WordPress plugin LMWD Tree Zip scored10%from 54 tests.

About plugin

  • Plugin page: lmwd-ziptree
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Sep 8, 2014
  • Latest release: Sep 9, 2014
  • Number of updates: 9
  • Update frequency: every 2.3 days
  • Top authors: lmwebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /652 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/lmwd-ziptree/lmwd-tree-zip.php+28
    Undefined index: page

Server metrics [RAM: ▼1.95MB] [CPU: ▼61.44ms] Passed 4 tests

This is a short check of server-side resources used by LMWD Tree Zip
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.44 ▼38.42
Dashboard /wp-admin2.08 ▼1.275.65 ▼61.58
Posts /wp-admin/edit.php2.08 ▼1.286.59 ▼44.23
Add New Post /wp-admin/post-new.php2.08 ▼3.815.35 ▼101.52
Media Library /wp-admin/upload.php2.08 ▼1.164.93 ▼37.09
ZipTree /wp-admin/options-general.php?page=ZipTree3.0023.90

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LMWD Tree Zip
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.24 ▼0.041.92 ▼0.2443.69 ▼3.22
Dashboard /wp-admin2,193 ▲165.52 ▼0.0185.04 ▼7.6338.35 ▼2.77
Posts /wp-admin/edit.php2,104 ▲11.98 ▼0.0533.65 ▼8.3933.96 ▼6.10
Add New Post /wp-admin/post-new.php1,534 ▲822.87 ▼0.26678.58 ▼55.7457.45 ▼0.33
Media Library /wp-admin/upload.php1,398 ▼24.22 ▲0.03101.18 ▼5.2745.62 ▼2.36
ZipTree /wp-admin/options-general.php?page=ZipTree8102.0426.0431.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/lmwd-ziptree/lmwd-tree-zip.php+28
    Undefined index: page
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ZipTree
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=ZipTree
    • > Notice in wp-content/plugins/lmwd-ziptree/lmwd-defines.php+3
    Constant DS already defined

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: ztd in wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php on line 16
    • > PHP Warning
      Use of undefined constant DS - assumed 'DS' (this will throw an Error in a future version of PHP) in wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php on line 16
    • > PHP Notice
      Undefined index: page in wp-content/plugins/lmwd-ziptree/lmwd-tree-zip.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/lmwd-ziptree/lmwd-defines.php:4
    • > PHP Notice
      Undefined variable: uploads in wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/lmwd-ziptree/lmwd-defines.php:4
    • > PHP Warning
      sort() expects parameter 1 to be array, null given in wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/lmwd-ziptree/lmwd-defines.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lmwd-ziptree/lmwd-tree-zip.php:56
    • > PHP Warning
      Use of undefined constant DS - assumed 'DS' (this will throw an Error in a future version of PHP) in wp-content/plugins/lmwd-ziptree/lmwd_ziptree_admin.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please a description for screenshot #2 in lmwd-ziptree/assets to your readme.txt
  • Plugin Name: Please specify the plugin name on the first line ( === lmwd-ziptree === )
The official readme.txt is a good inspiration

lmwd-ziptree/lmwd-tree-zip.php 92% from 13 tests

"LMWD Tree Zip" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lmwd-ziptree.php" instead of "lmwd-tree-zip.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin610 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP65345297
JavaScript12613140
SVG10092
CSS11181

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods150.00%
▷ Protected methods00.00%
▷ Private methods150.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin