84% listings-post-type-enable

Code Review | Listings Post Type Enable

WordPress plugin Listings Post Type Enable scored 84% from 54 tests.

About plugin

  • Plugin page: listings-post-typ...
  • Plugin version: 0.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2014
  • Latest release: Aug 1, 2022
  • Number of updates: 7
  • Update frequency: every 434.4 days
  • Top authors: alexitsios (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 19,632 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.14MB] [CPU: ▼2.44ms] Passed 4 tests

Server-side resources used by Listings Post Type Enable
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1536.56 ▼3.05
Dashboard /wp-admin3.43 ▲0.1347.37 ▲0.60
Posts /wp-admin/edit.php3.55 ▲0.1945.94 ▼0.59
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.54 ▼6.72
Media Library /wp-admin/upload.php3.36 ▲0.1335.19 ▲4.19
Listing Categories /wp-admin/edit-tags.php?taxonomy=listing-category&post_type=listing3.3534.15
Add New /wp-admin/post-new.php?post_type=listing3.5154.37
Listing Tags /wp-admin/edit-tags.php?taxonomy=listing-tag&post_type=listing3.3535.33
All Listings /wp-admin/edit.php?post_type=listing3.4034.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_ketchupthemes-recent-topics
widget_recent-comments
widget_recent-posts
widget_directory_listings_category_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Listings Post Type Enable
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.24 ▼1.144.49 ▲2.7641.28 ▲0.65
Dashboard /wp-admin2,238 ▲494.86 ▼1.01109.65 ▼4.9839.74 ▲0.49
Posts /wp-admin/edit.php2,127 ▲412.00 ▼0.0538.37 ▲1.5537.10 ▲5.76
Add New Post /wp-admin/post-new.php1,563 ▲4323.31 ▲0.00658.98 ▲15.2850.62 ▼12.83
Media Library /wp-admin/upload.php1,423 ▲354.38 ▲0.2295.34 ▼2.0641.59 ▼5.32
Listing Categories /wp-admin/edit-tags.php?taxonomy=listing-category&post_type=listing1,2942.1426.0127.38
Add New /wp-admin/post-new.php?post_type=listing3,0508.02188.2076.61
Listing Tags /wp-admin/edit-tags.php?taxonomy=listing-tag&post_type=listing1,2662.1427.0226.36
All Listings /wp-admin/edit.php?post_type=listing1,1521.9431.2129.82

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 8 options in the database
    • db_upgraded
    • widget_ketchupthemes-recent-topics
    • widget_directory_listings_category_widget
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/listings-post-type-enable/listings.php: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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: directory post type, listings post type, custom widget, custom post type

listings-post-type-enable/listings.php 85% from 13 tests

The main file in "Listings Post Type Enable" v. 0.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 222 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("listings-post-type-enable.php" instead of "listings.php")

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 plugin335 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18221316
Markdown112019

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity14.00
▷ Minimum class complexity10.00
▷ Maximum class complexity18.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
There were not PNG files found in your plugin