83% save-as-image-by-pdfcrowd

Code Review | Save as Image plugin by Pdfcrowd

WordPress plugin Save as Image plugin by Pdfcrowd scored83%from 54 tests.

About plugin

  • Plugin page: save-as-image-by-...
  • Plugin version: 3.2.0
  • PHP compatiblity: 5.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 9, 2019
  • Latest release: Nov 9, 2023
  • Number of updates: 77
  • Update frequency: every 19.8 days
  • Top authors: pdfcrowd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,965 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼2.71ms] Passed 4 tests

Server-side resources used by Save as Image plugin by Pdfcrowd
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.87 ▲0.4137.85 ▼2.62
Dashboard /wp-admin3.73 ▲0.3848.57 ▼14.11
Posts /wp-admin/edit.php3.78 ▲0.4251.47 ▲5.50
Add New Post /wp-admin/post-new.php6.27 ▲0.3897.16 ▲1.39
Media Library /wp-admin/upload.php3.59 ▲0.3636.42 ▲4.49
Save as Image /wp-admin/options-general.php?page=save-as-image-pdfcrowd3.8938.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Save as Image plugin by Pdfcrowd
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲15913.62 ▼0.899.32 ▲7.4046.78 ▲2.66
Dashboard /wp-admin2,221 ▲434.88 ▼0.8196.57 ▼18.2738.31 ▼3.65
Posts /wp-admin/edit.php2,113 ▲132.30 ▲0.3541.45 ▲3.1235.26 ▼0.27
Add New Post /wp-admin/post-new.php1,562 ▲3125.39 ▲2.63622.49 ▲14.9144.35 ▼3.36
Media Library /wp-admin/upload.php1,433 ▲394.36 ▲0.2092.67 ▼2.5039.99 ▼1.53
Save as Image /wp-admin/options-general.php?page=save-as-image-pdfcrowd5,8933.3384.3255.73

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/appearance.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/behavior.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/wizard.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/appearance.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_transient() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/save-as-image-pdfcrowd-admin-display.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/license-settings.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/save-as-image-by-pdfcrowd/admin/partials/mode.php:39

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
The official readme.txt might help

save-as-image-by-pdfcrowd/save-as-image-pdfcrowd.php 85% from 13 tests

"Save as Image plugin by Pdfcrowd" version 3.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("save-as-image-by-pdfcrowd.php" instead of "save-as-image-pdfcrowd.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin6,261 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP174496365,597
CSS41410660
JavaScript4004

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 178)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity68.29
▷ Minimum class complexity1.00
▷ Maximum class complexity281.00
Average method complexity7.01
▷ Minimum method complexity1.00
▷ Maximum method complexity178.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods77
▷ Static methods3241.56%
▷ Public methods3849.35%
▷ Protected methods00.00%
▷ Private methods3950.65%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants1
▷ Global constants1100.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
No PNG files were detected