84% wpjam-basic

Code Review | WPJAM Basic

WordPress plugin WPJAM Basic scored84%from 54 tests.

About plugin

  • Plugin page: wpjam-basic
  • Plugin version: 6.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.2-6.4
  • WordPress version: 6.3.1
  • First release: Jan 5, 2016
  • Latest release: Dec 1, 2023
  • Number of updates: 693
  • Update frequency: every 4.2 days
  • Top authors: denishua (97.69%)imhui (2.45%)

Code review

54 tests

User reviews

30 reviews

Install metrics

2,000+ active /528,508 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: ▲4.67MB] [CPU: ▲22.81ms] Passed 4 tests

A check of server-side resources used by WPJAM Basic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.35 ▲3.8968.14 ▲25.19
Dashboard /wp-admin8.29 ▲4.9985.47 ▲38.80
Posts /wp-admin/edit.php8.37 ▲5.0174.29 ▲24.69
Add New Post /wp-admin/post-new.php10.84 ▲4.95105.51 ▲13.20
Media Library /wp-admin/upload.php8.09 ▲4.8662.02 ▲28.14
优化设置 /wp-admin/admin.php?page=wpjam-basic8.1866.19
扩展管理 /wp-admin/admin.php?page=wpjam-verify8.1566.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 66 new files
Database: no new tables, 13 new options
New WordPress options
wpjam-thumbnail
wpjam-custom
widget_recent-comments
wpjam-cdn
wpjam-extends
wpjam-basic
theysaidso_admin_options
can_compress_scripts
db_upgraded
wpjam-links
...

Browser metrics Passed 4 tests

A check of browser resources used by WPJAM Basic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4314.41 ▲0.161.45 ▼0.4143.86 ▼1.29
Dashboard /wp-admin2,225 ▲486.46 ▲0.84115.62 ▲19.1554.58 ▲7.08
Posts /wp-admin/edit.php2,337 ▲2373.97 ▲2.0362.26 ▲22.0688.44 ▲50.48
Add New Post /wp-admin/post-new.php1,552 ▲2623.02 ▼0.03686.18 ▼1.7838.04 ▼13.10
Media Library /wp-admin/upload.php1,440 ▲464.67 ▲0.5891.77 ▼28.2348.77 ▼1.16
优化设置 /wp-admin/admin.php?page=wpjam-basic1,3623.9359.86103.70
扩展管理 /wp-admin/admin.php?page=wpjam-verify1,0333.4550.8251.35

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_theysaidso_widget
    • wpjam-basic
    • wpjam-thumbnail
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • wpjam-cdn
    • wpjam-extends
    • wpjam-custom
    • ...

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
  • 54× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'WPJAM_Instance_Trait' not found in wp-content/plugins/wpjam-basic/includes/class-wpjam-term.php on line 2
    • > PHP Warning
      Class 'WPJAM_Post' not found in wp-content/plugins/wpjam-basic/public/wpjam-compat.php on line 5
    • > PHP Warning
      Class 'WPJAM_Option_Items' not found in wp-content/plugins/wpjam-basic/public/wpjam-compat.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wpjam-basic/cdn/qiniu.php:2
    • > PHP Warning
      include(): Failed opening 'ABSPATHwp-admin/includes/class-wp-list-table.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/wpjam-basic/includes/class-wpjam-list-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wpjam-basic/extends/wpjam-roles.php:200
    • > PHP Fatal error
      Uncaught Error: Class 'WPJAM_Register' not found in wp-content/plugins/wpjam-basic/includes/class-wpjam-admin.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'WPJAM_Model' not found in wp-content/plugins/wpjam-basic/extends/301-redirects.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPJAM_Args' not found in wp-content/plugins/wpjam-basic/components/wpjam-crons.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPJAM_Attr' not found in wp-content/plugins/wpjam-basic/includes/class-wpjam-field.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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: wpjam, memcached

wpjam-basic/wpjam-basic.php Passed 13 tests

The principal PHP file in "WPJAM Basic" v. 6.4.1 is loaded by WordPress automatically on each request
77 characters long description:
WPJAM 常用的函数和接口,屏蔽所有 WordPress 不常用的功能。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin25,338 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP536,23446223,169
JavaScript4510141,911
CSS1600258

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity31.26
▷ Minimum class complexity1.00
▷ Maximum class complexity251.00
Average method complexity4.24
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits7
Classes145
▷ Abstract classes10.69%
▷ Concrete classes14499.31%
▷ Final classes00.00%
Methods1,413
▷ Static methods64745.79%
▷ Public methods1,22486.62%
▷ Protected methods17512.38%
▷ Private methods140.99%
Functions569
▷ Named functions53493.85%
▷ Anonymous functions356.15%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected