84% wparchivestree

Code Review | WPArchivesTree

WordPress plugin WPArchivesTree scored84%from 54 tests.

About plugin

  • Plugin page: wparchivestree
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.3
  • WordPress version: 6.3.1
  • First release: Nov 25, 2014
  • Latest release: Nov 15, 2017
  • Number of updates: 9
  • Update frequency: every 120.7 days
  • Top authors: Benyamin.info (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /972 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by WPArchivesTree
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.07 ▼2.60
Dashboard /wp-admin3.33 ▲0.0349.63 ▼6.71
Posts /wp-admin/edit.php3.38 ▲0.0349.61 ▼4.70
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.63 ▼40.13
Media Library /wp-admin/upload.php3.26 ▲0.0339.60 ▲2.50

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_wparchivestree_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPArchivesTree
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.181.71 ▼0.1546.03 ▲4.81
Dashboard /wp-admin2,198 ▲305.58 ▲0.0086.32 ▼8.7838.33 ▼6.82
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0236.87 ▲0.1634.85 ▼1.98
Add New Post /wp-admin/post-new.php1,526 ▼323.04 ▼0.01652.07 ▲16.5055.75 ▲2.56
Media Library /wp-admin/upload.php1,397 ▼64.28 ▲0.08103.07 ▼1.0245.39 ▼2.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_wparchivestree_widget
    • db_upgraded
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

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
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wparchivestree/frontend.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wparchivestree/wparchivestree.php:31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wparchivestree/frontend.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_posts() in wp-content/plugins/wparchivestree/frontend.php:9
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/wparchivestree/frontend.php on line 3
    • > PHP Notice
      Undefined variable: instance in wp-content/plugins/wparchivestree/frontend.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: tree, widget, archives, treeview, archive

wparchivestree/wparchivestree.php Passed 13 tests

The main PHP script in "WPArchivesTree" version 1.1 is automatically included on every request by WordPress
66 characters long description:
A widget to display a treeview of articles group by month and year

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin174 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33735153
CSS15021

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.50
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/1416795695_arrow-right-01-24.png0.43KB0.28KB▼ 33.94%
screenshot-2.png22.67KB11.48KB▼ 49.35%
img/1416797994_arrow-down-01-16.png0.33KB0.28KB▼ 14.88%
img/1416795699_arrow-right-01-16.png0.28KB0.20KB▼ 29.17%
screenshot-1.png4.81KB3.08KB▼ 36.02%