62% advanced-plugin-view

Code Review | Advanced Plugin View

WordPress plugin Advanced Plugin View scored62%from 54 tests.

About plugin

  • Plugin page: advanced-plugin-view
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Dec 5, 2017
  • Number of updates: 9
  • Update frequency: every 1.8 days
  • Top authors: klickonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.83MB] [CPU: ▼34.94ms] Passed 4 tests

A check of server-side resources used by Advanced Plugin View
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1343.15 ▲2.95
Dashboard /wp-admin3.12 ▼0.2227.97 ▼34.15
Posts /wp-admin/edit.php3.12 ▼0.2334.43 ▼15.70
Add New Post /wp-admin/post-new.php3.12 ▼2.7624.97 ▼75.03
Media Library /wp-admin/upload.php3.12 ▼0.1121.64 ▼14.88
Advanced Plugin View /wp-admin/options-general.php?page=klick_apv3.1225.75

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 7 new options
New WordPress options
klick-apv-logging
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Plugin View
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲16114.31 ▼0.185.98 ▲4.2843.89 ▼4.01
Dashboard /wp-admin2,216 ▲395.32 ▼0.3398.17 ▲9.2938.00 ▼5.52
Posts /wp-admin/edit.php2,124 ▲212.53 ▲0.4338.12 ▼2.6732.47 ▼7.13
Add New Post /wp-admin/post-new.php1,555 ▲2923.79 ▲0.21675.79 ▼19.3841.32 ▼14.47
Media Library /wp-admin/upload.php1,421 ▲244.82 ▲0.6597.79 ▼6.0345.33 ▼1.09
Advanced Plugin View /wp-admin/options-general.php?page=klick_apv1,5412.4327.4732.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=klick_apv
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 14× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-notifier.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-abstract-notice.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-commands.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-options.php
    • > /wp-content/plugins/advanced-plugin-view/templates/klick-apv-tabs-header.php
    • > /wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-change-log.php
    • > /wp-content/plugins/advanced-plugin-view/advanced-plugin-view.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-abstract-logger.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-logger.php
    • > /wp-content/plugins/advanced-plugin-view/templates/notices-templates/horizontal-notice.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-our-other-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function klick_apv() in wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-plugin-stats.php:20
    • > PHP Warning
      Use of undefined constant KLICK_APV_PLUGIN_URL - assumed 'KLICK_APV_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-plugin-stats.php on line 8
    • > PHP Warning
      Use of undefined constant KLICK_APV_PLUGIN_URL - assumed 'KLICK_APV_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-our-other-plugins.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Advanced Plugin View Add Tab), #2 (Advanced Plugin View List Tab), #3 (Advanced Plugin Details Tab)
The official readme.txt might help

advanced-plugin-view/advanced-plugin-view.php 92% from 13 tests

"Advanced Plugin View" version 0.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
There were no executable files found in this plugin2,490 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP19297503902
CSS62912597
SVG10010475
JavaScript474156472
Markdown124044

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods76
▷ Static methods67.89%
▷ Public methods7598.68%
▷ Protected methods00.00%
▷ Private methods11.32%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
6 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/apv_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/notices/apv_sample_notice_icon.png20.74KB1.79KB▼ 91.39%
images/small_icon.png18.12KB0.45KB▼ 97.52%
images/apv-banner.png63.94KB22.67KB▼ 64.54%
images/notices/apv_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%