74% advanced-pins

Code Review | Advanced Pins

WordPress plugin Advanced Pins scored 74% 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: 6.3.1
  • 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 / 647 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.14MB] [CPU: ▼42.64ms] Passed 4 tests

A check of server-side resources used by Advanced Pins
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▼0.6314.94 ▼26.10
Dashboard /wp-admin2.87 ▼0.4316.97 ▼36.14
Posts /wp-admin/edit.php2.87 ▼0.4919.02 ▼29.24
Add New Post /wp-admin/post-new.php2.87 ▼3.0217.83 ▼79.07
Media Library /wp-admin/upload.php2.87 ▼0.3616.91 ▼19.95

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, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Pins
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,186 ▲45124.87 ▲10.578.34 ▲6.5238.50 ▼5.88
Dashboard /wp-admin2,471 ▲28314.66 ▲9.77284.18 ▲173.8343.50 ▲4.93
Posts /wp-admin/edit.php2,399 ▲31012.56 ▲10.56144.53 ▲107.3133.37 ▲1.07
Add New Post /wp-admin/post-new.php6,902 ▲5,37421.34 ▲3.27775.80 ▲138.5435.88 ▼11.53
Media Library /wp-admin/upload.php1,489 ▲9813.69 ▲9.43137.99 ▲32.7140.83 ▼3.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\authorization_check() in wp-content/plugins/advanced-pins/php/frontend.php:8
    • > 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\\asset() in wp-content/plugins/advanced-pins/templates/settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\get_option() in wp-content/plugins/advanced-pins/templates/metabox.php:39
    • > 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\\add_action() in wp-content/plugins/advanced-pins/php/admin.php:8
    • > 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
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apx\\add_action() in wp-content/plugins/advanced-pins/php/frontend.php:10

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: image, pin description, pinterest, seo

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

"Advanced Pins" version 0.6.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
Good job! No executable or dangerous file extensions detected8,128 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42,0561,9577,471
PHP814986581
CSS326376

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
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

It is recommended to compress PNG files in your plugin to 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/logo.png75.67KB23.83KB▼ 68.51%
assets/badge.png9.32KB3.21KB▼ 65.56%