89% wp-jpost

Code Review | WP-JPOST

WordPress plugin WP-JPOST scored89%from 54 tests.

About plugin

  • Plugin page: wp-jpost
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Apr 23, 2023
  • Number of updates: 111
  • Update frequency: every 18.8 days
  • Top authors: _jerryjee (100%)Otto42 (1.8%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /17,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.81ms] Passed 4 tests

A check of server-side resources used by WP-JPOST
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.56 ▼4.08
Dashboard /wp-admin3.39 ▲0.0454.17 ▼9.31
Posts /wp-admin/edit.php3.49 ▲0.1358.80 ▲9.58
Add New Post /wp-admin/post-new.php6.07 ▲0.18101.21 ▲2.59
Media Library /wp-admin/upload.php3.31 ▲0.0846.31 ▲7.58
采集列表 /wp-admin/edit.php?post_type=wp-jpost3.3545.09
添加 /wp-admin/post-new.php?post_type=wp-jpost3.3955.35

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP-JPOST
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.29 ▼0.071.94 ▲0.3239.70 ▼2.15
Dashboard /wp-admin2,235 ▲555.63 ▼0.2090.11 ▲1.1252.45 ▲10.27
Posts /wp-admin/edit.php2,151 ▲511.98 ▼0.0139.93 ▲4.7551.77 ▲12.03
Add New Post /wp-admin/post-new.php1,570 ▲4222.90 ▼0.29608.78 ▼76.9650.26 ▼14.93
Media Library /wp-admin/upload.php1,437 ▲374.27 ▲0.1799.07 ▼11.2850.19 ▲3.72
采集列表 /wp-admin/edit.php?post_type=wp-jpost1,1551.9634.1868.21
添加 /wp-admin/post-new.php?post_type=wp-jpost1,9602.8158.72100.25

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (https://www.jiloc.com/wp-content/uploads/2017/08/TIM%E6%88%AA%E5%9B%BE20170803143653.png), #2 (https://www.jiloc.com/wp-content/uploads/2017/08/TIM%E6%88%AA%E5%9B%BE20170803143708.png), #3 (https://www.jiloc.com/wp-content/uploads/2017/08/TIM%E6%88%AA%E5%9B%BE20170803143850.png)
Please take inspiration from this readme.txt

wp-jpost/plugin.php 92% from 13 tests

The main PHP script in "WP-JPOST" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-jpost.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,871 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP75928033,492
JavaScript25222267
CSS278112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity113.83
▷ Minimum class complexity9.00
▷ Maximum class complexity249.00
Average method complexity5.91
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods138
▷ Static methods32.17%
▷ Public methods11583.33%
▷ Protected methods1510.87%
▷ Private methods85.80%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants25100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/contact.png19.05KB10.65KB▼ 44.12%