72% advanced-plugin-view

Code Review | Advanced Plugin View

WordPress plugin Advanced Plugin View scored 72% 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: 5.9.2
  • 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 / 543 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼1.17MB] [CPU: ▼328.10ms] Passed 4 tests

An overview of server-side resources used by Advanced Plugin View
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0954.40 ▲4.04
Dashboard /wp-admin3.16 ▼0.2517.89 ▼14.88
Posts /wp-admin/edit.php3.16 ▼0.4819.81 ▼17.05
Add New Post /wp-admin/post-new.php3.16 ▼3.8118.38 ▼1,270.13
Media Library /wp-admin/upload.php3.16 ▼0.1415.61 ▼10.33
Advanced Plugin View /wp-admin/options-general.php?page=klick_apv3.1617.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 51 new files
Database: no new tables, 1 new option
New WordPress options
klick-apv-logging

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Plugin View
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,930 ▲18517.61 ▲1.759.28 ▲3.432.27 ▼0.40
Dashboard /wp-admin2,939 ▲557.48 ▲1.03138.85 ▼1.26153.58 ▼9.09
Posts /wp-admin/edit.php2,712 ▲183.66 ▲0.1068.97 ▲7.32153.95 ▲11.95
Add New Post /wp-admin/post-new.php1,681 ▲2117.86 ▲0.70429.27 ▲23.48178.77 ▲7.11
Media Library /wp-admin/upload.php1,722 ▲246.50 ▲0.75129.59 ▼13.10186.92 ▲3.84
Advanced Plugin View /wp-admin/options-general.php?page=klick_apv1,8873.4858.40155.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=klick_apv
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-abstract-notice.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-options.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-abstract-logger.php
    • > /wp-content/plugins/advanced-plugin-view/templates/klick-apv-tab-change-log.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-plugins.php
    • > /wp-content/plugins/advanced-plugin-view/templates/klick-apv-tabs-header.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-notifier.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-php-logger.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-commands.php
    • > /wp-content/plugins/advanced-plugin-view/includes/class-klick-apv-dashboard.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > 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 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 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
    • > 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

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
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 primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected2,490 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP19297503902
CSS62912597
SVG10010475
JavaScript474156472
Markdown124044

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic 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

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/notices/apv_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%
images/notices/apv_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/apv-banner.png63.94KB22.67KB▼ 64.54%
images/klick-on-it.png6.51KB4.02KB▼ 38.23%
images/notices/apv_sample_notice_icon.png20.74KB1.79KB▼ 91.39%