74% page-listing-categories

Code Review | Page Listing Categories

WordPress plugin Page Listing Categories scored 74% from 54 tests.

About plugin

  • Plugin page: page-listing-cate...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 1, 2017
  • Latest release: Feb 26, 2018
  • Number of updates: 35
  • Update frequency: every 11.1 days
  • Top authors: infolabdevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,610 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.71MB] [CPU: ▼54.15ms] Passed 4 tests

A check of server-side resources used by Page Listing Categories
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.188.26 ▼34.77
Dashboard /wp-admin2.29 ▼1.0112.34 ▼42.04
Posts /wp-admin/edit.php2.29 ▼1.0611.56 ▼53.68
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.85 ▼86.09
Media Library /wp-admin/upload.php2.29 ▼0.9411.99 ▼18.76

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_wp_plc
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Page Listing Categories
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.68 ▼0.754.92 ▲3.2041.32 ▼3.02
Dashboard /wp-admin2,206 ▲185.91 ▲1.01107.73 ▼14.7542.27 ▼1.38
Posts /wp-admin/edit.php2,092 ▼72.14 ▲0.1841.64 ▲0.9236.46 ▼1.66
Add New Post /wp-admin/post-new.php1,514 ▼2017.75 ▼5.27659.93 ▼36.4350.15 ▼8.15
Media Library /wp-admin/upload.php1,385 ▼34.15 ▼0.0794.59 ▼12.2939.96 ▼6.13

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method PageListingCategories::plc_widget_init() should not be called statically
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_wp_plc
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

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)
Good news, no errors were detected

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
The following issues need your attention
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/page-listing-categories/includes/functions.php
    • > /wp-content/plugins/page-listing-categories/templates/widget.template.php
    • > /wp-content/plugins/page-listing-categories/templates/categories.template.php
    • > /wp-content/plugins/page-listing-categories/includes/widgets/widget-list-categories.php
    • > /wp-content/plugins/page-listing-categories/includes/model/get-categories.php
    • > /wp-content/plugins/page-listing-categories/includes/view.php
    • > /wp-content/plugins/page-listing-categories/templates/subcategories.template.php
    • > /wp-content/plugins/page-listing-categories/page-listing-categories.php
    • > /wp-content/plugins/page-listing-categories/includes/shortcodes/shortcode-list-categories.php

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 on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

page-listing-categories/page-listing-categories.php Passed 13 tests

"Page Listing Categories" version 0.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
99 characters long description:
Provides the ability to list categories on any post or page, includes support for custom taxonomies

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected9,389 lines of code in 44 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
CSS420742,532
Sass1434341,768
LESS1434441,758
PHP969394447
JavaScript22732213

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity21.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin