84% wp-assistant

Code Review | WP Assistant

WordPress plugin WP Assistant scored84%from 54 tests.

About plugin

  • Plugin page: wp-assistant
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-4.4
  • WordPress version: 6.3.1
  • First release: Mar 5, 2015
  • Latest release: Apr 5, 2016
  • Number of updates: 31
  • Update frequency: every 12.8 days
  • Top authors: ishihara takashi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.60MB] [CPU: ▲2.59ms] Passed 4 tests

A check of server-side resources used by WP Assistant
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5444.72 ▲2.98
Dashboard /wp-admin3.96 ▲0.6553.92 ▲2.41
Posts /wp-admin/edit.php4.02 ▲0.6649.85 ▲2.78
Add New Post /wp-admin/post-new.php6.51 ▲0.6297.83 ▲2.19
Media Library /wp-admin/upload.php3.83 ▲0.6040.35 ▲5.23

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 68 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
wpa_options
db_upgraded
widget_theysaidso_widget
wpa_install
wpa_install_wp_version
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Assistant
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,287 ▲55215.56 ▲1.261.83 ▼0.8145.18 ▼3.17
Dashboard /wp-admin2,689 ▲5017.22 ▲1.36146.77 ▲43.0751.03 ▲10.41
Posts /wp-admin/edit.php2,055 ▼342.51 ▲0.4856.29 ▲16.1832.52 ▼5.32
Add New Post /wp-admin/post-new.php1,805 ▲27623.63 ▲0.49616.30 ▼75.4534.61 ▼27.02
Media Library /wp-admin/upload.php1,715 ▲3244.83 ▲0.61100.59 ▼1.6151.91 ▲7.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • wpa_options
    • widget_recent-posts
    • wpa_install
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • wpa_install_wp_version

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 23× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-assistant/inc/views/options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\modules\\module' not found in wp-content/plugins/wp-assistant/modules/originalCss/originalCss.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\inc\\fields\\field' not found in wp-content/plugins/wp-assistant/inc/fields/source.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\inc\\fields\\field' not found in wp-content/plugins/wp-assistant/inc/fields/text.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\inc\\fields\\field' not found in wp-content/plugins/wp-assistant/inc/fields/media.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\modules\\module' not found in wp-content/plugins/wp-assistant/modules/dashboard/dashboard.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-assistant/modules/admin/views/options.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\inc\\fields\\field' not found in wp-content/plugins/wp-assistant/inc/fields/selectbox.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\modules\\module' not found in wp-content/plugins/wp-assistant/modules/templateEditor/templateEditor.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Assistant\\inc\\fields\\field' not found in wp-content/plugins/wp-assistant/inc/fields/textarea.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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (General setting), #2 (Customize Admin menu.), #3 (Database optimization.)
The official readme.txt might help

wp-assistant/wp-assistant.php Passed 13 tests

Analyzing the main PHP file in "WP Assistant" version 0.4.3
71 characters long description:
This plugin to provide a convenient function when build WordPress site.

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
There were no executable files found in this plugin11,123 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP336631,1583,347
Sass223832,980
CSS44131052,945
JavaScript101862571,494
PO File1116144281
JSON10038
Markdown117038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity12.03
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces20
Interfaces0
Traits0
Classes31
▷ Abstract classes13.23%
▷ Concrete classes3096.77%
▷ Final classes00.00%
Methods188
▷ Static methods3418.09%
▷ Public methods17794.15%
▷ Protected methods21.06%
▷ Private methods94.79%
Functions26
▷ Named functions00.00%
▷ Anonymous functions26100.00%
Constants4
▷ Global constants4100.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
3 compressed PNG files occupy 0.09MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png36.63KB37.39KB0.00%
screenshot-2.png29.50KB29.62KB0.00%
screenshot-3.png30.57KB31.13KB0.00%