73% post-listing

Code Review | Post Listing

WordPress plugin Post Listing scored73%from 54 tests.

About plugin

  • Plugin page: post-listing
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Jun 3, 2016
  • Latest release: Oct 3, 2016
  • Number of updates: 3
  • Update frequency: every 40.7 days
  • Top authors: farvehandleren (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,004 total downloads

Benchmarks

Plugin footprint 65% 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.94MB] [CPU: ▼37.37ms] Passed 4 tests

Server-side resources used by Post Listing
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.76 ▼3.07
Dashboard /wp-admin3.02 ▼0.3325.59 ▼39.63
Posts /wp-admin/edit.php3.02 ▼0.3426.46 ▼23.54
Add New Post /wp-admin/post-new.php3.02 ▼2.8724.28 ▼72.14
Media Library /wp-admin/upload.php3.02 ▼0.2125.47 ▼14.15

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Listing
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.72 ▲0.311.67 ▲0.1043.77 ▼3.22
Dashboard /wp-admin2,212 ▲355.66 ▲0.0384.49 ▼8.3878.47 ▲36.05
Posts /wp-admin/edit.php2,120 ▲172.01 ▼0.0236.85 ▼5.3434.86 ▼5.79
Add New Post /wp-admin/post-new.php1,695 ▲16922.30 ▼0.86742.33 ▲41.0750.80 ▼9.63
Media Library /wp-admin/upload.php1,414 ▲174.18 ▲0.01113.94 ▲3.4280.25 ▲33.88

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > 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.
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/post-listing/post-listing-admin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: category, posts, type, post listing, tag

post-listing/ri_post.php 85% from 13 tests

This is the main PHP file of "Post Listing" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("post-listing.php" instead of "ri_post.php")

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 detected371 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24041279
CSS38092

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.08MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) img/plugin-icon.png77.77KB0.00KB▼ 100.00%