84% pin-generator

Code Review | Pin Generator

WordPress plugin Pin Generator scored84%from 54 tests.

About plugin

  • Plugin page: pin-generator
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2022
  • Latest release: Feb 4, 2022
  • Number of updates: 7
  • Update frequency: every 0.4 days
  • Top authors: mroli3000 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /879 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.19ms] Passed 4 tests

Server-side resources used by Pin Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1146.42 ▲0.85
Dashboard /wp-admin3.42 ▲0.0751.21 ▼12.72
Posts /wp-admin/edit.php3.47 ▲0.1153.87 ▲4.59
Add New Post /wp-admin/post-new.php6.03 ▲0.1488.75 ▼17.49
Media Library /wp-admin/upload.php3.36 ▲0.1245.26 ▲6.82
Settings /wp-admin/admin.php?page=pin-generator-settings3.3436.85

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
pin_generator_access_key
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
pin_generator_design_settings
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Pin Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12114.39 ▼0.3312.13 ▲10.3747.41 ▲3.59
Dashboard /wp-admin2,231 ▲545.97 ▲0.4092.99 ▼2.9440.06 ▼3.38
Posts /wp-admin/edit.php2,182 ▲792.31 ▲0.3043.05 ▲0.5537.48 ▲1.59
Add New Post /wp-admin/post-new.php1,555 ▲1823.57 ▲5.29665.97 ▼22.6836.78 ▼34.66
Media Library /wp-admin/upload.php1,439 ▲454.41 ▲0.23105.81 ▲3.9249.21 ▲6.66
Settings /wp-admin/admin.php?page=pin-generator-settings1,1462.4339.1039.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_recent-comments
    • pin_generator_design_settings
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • pin_generator_access_key

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/pin-generator/templates/admin/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/frontend/pin-generator-insert-pins.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-scripts.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-options.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-activation-hook.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-menus.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-settings-fields.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pin-generator/includes/pin-generator-post-column.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pin-generator/includes/pin-generator-styles.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: pin generator, pinterest, image generator

pin-generator/pin-generator.php 92% from 13 tests

The primary PHP file in "Pin Generator" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

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
There were no executable files found in this plugin747 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10160113586
JavaScript1111086
CSS218175

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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
Namespaces0
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%
Functions28
▷ Named functions28100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 1.51MB with 0.34MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/screenshots/plugin-screenshot-1.png408.70KB434.11KB0.00%
images/screenshots/plugin-screenshot-3.png770.31KB243.98KB▼ 68.33%
images/screenshots/plugin-screenshot-2.png363.98KB388.77KB0.00%