84% advanced-pins

Code Review | Advanced Pins

WordPress plugin Advanced Pins scored 84% from 54 tests.

About plugin

  • Plugin page: advanced-pins
  • Plugin version: 0.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.2
  • WordPress version: 5.9.2
  • First release: Sep 9, 2019
  • Latest release: Sep 10, 2019
  • Number of updates: 15
  • Update frequency: every 0.8 days
  • Top authors: ckmahoney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 438 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 gracefully, with no errors

Server metrics [RAM: ▼1.48MB] [CPU: ▼338.74ms] Passed 4 tests

A check of server-side resources used by Advanced Pins
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▼0.5517.60 ▼34.79
Dashboard /wp-admin2.88 ▼0.5313.11 ▼20.13
Posts /wp-admin/edit.php2.88 ▼0.7613.74 ▼20.75
Add New Post /wp-admin/post-new.php2.88 ▼4.0914.48 ▼1,279.29
Media Library /wp-admin/upload.php2.88 ▼0.4112.55 ▼12.85

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Pins
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,222 ▲46727.27 ▲11.6610.35 ▲4.142.92 ▲0.64
Dashboard /wp-admin3,199 ▲34115.37 ▲9.18331.57 ▲184.97160.82 ▼4.58
Posts /wp-admin/edit.php3,056 ▲36813.51 ▲10.28136.94 ▲73.21141.02 ▼1.51
Add New Post /wp-admin/post-new.php1,893 ▲18224.61 ▲3.96255.67 ▼203.39188.60 ▲32.54
Media Library /wp-admin/upload.php1,835 ▲13414.79 ▲9.32165.28 ▲21.24186.32 ▼5.70

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 cannot be uninstalled
    • > User notice in wp-includes/functions.php+5768
    register_meta was called incorrectly. When registering a default meta value the data must match the type provided. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

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 items
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\add_action() in wp-content/plugins/advanced-pins/php/frontend.php:10
    • > PHP Warning
      Use of undefined constant wp_die - assumed 'wp_die' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-pins/php/functions.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\authorization_check() in wp-content/plugins/advanced-pins/php/frontend.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\add_action() in wp-content/plugins/advanced-pins/php/admin.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\asset() in wp-content/plugins/advanced-pins/templates/settings-page.php:3
    • > PHP Warning
      Use of undefined constant wp_die - assumed 'wp_die' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-pins/php/functions.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\get_option() in wp-content/plugins/advanced-pins/templates/metabox.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\add_action() in wp-content/plugins/advanced-pins/php/pageload.php:6
    • > PHP Warning
      Use of undefined constant wp_die - assumed 'wp_die' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-pins/php/functions.php on line 14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: image, seo, pin description, pinterest

advanced-pins/advanced-pins.php 92% from 13 tests

The main PHP file in "Advanced Pins" ver. 0.6.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • 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 not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,128 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42,0561,9577,471
PHP814986581
CSS326376

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions48
▷ Named functions4389.58%
▷ Anonymous functions510.42%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/badge.png9.32KB3.21KB▼ 65.56%
assets/logo.png75.67KB23.83KB▼ 68.51%