78% images-to-posts

Code Review | Images to Posts

WordPress plugin Images to Posts scored78%from 54 tests.

About plugin

  • Plugin page: images-to-posts
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.0.2
  • WordPress version: 6.3.1
  • First release: Jan 4, 2019
  • Latest release: Jan 6, 2019
  • Number of updates: 4
  • Update frequency: every 1.3 days
  • Top authors: slugiscool99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,219 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼7.18ms] Passed 4 tests

A check of server-side resources used by Images to Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.47 ▼5.62
Dashboard /wp-admin3.37 ▲0.0643.85 ▼8.61
Posts /wp-admin/edit.php3.42 ▲0.0648.95 ▲0.50
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.87 ▼14.99
Media Library /wp-admin/upload.php3.29 ▲0.0637.89 ▲4.89
Uploader /wp-admin/admin.php?page=bulk-images-to-post3.2730.34
Settings /wp-admin/admin.php?page=bip-settings-page3.2633.01

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Images to Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.19 ▼1.401.65 ▼0.0840.57 ▼2.47
Dashboard /wp-admin2,249 ▲585.81 ▲0.9197.84 ▼6.4541.98 ▼0.14
Posts /wp-admin/edit.php2,135 ▲462.03 ▼0.0040.75 ▲4.7038.49 ▲5.26
Add New Post /wp-admin/post-new.php1,566 ▲3322.87 ▼0.24729.00 ▲47.4058.34 ▼2.57
Media Library /wp-admin/upload.php1,428 ▲494.23 ▲0.05100.14 ▼3.9548.22 ▼1.01
Uploader /wp-admin/admin.php?page=bulk-images-to-post9162.0431.5131.59
Settings /wp-admin/admin.php?page=bip-settings-page1,0601.9941.2427.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/template.php' (include_path='.:/usr/share/php') in wp-content/plugins/images-to-posts/includes/bip-category-walker.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/images-to-posts/includes/bip-dropzone.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/images-to-posts/includes/bip-category-walker.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/images-to-posts/bulk-images-to-posts.php:16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/template.php): failed to open stream: No such file or directory in wp-content/plugins/images-to-posts/includes/bip-category-walker.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=bulk-images-to-post
    • > Javascript (severe) in unknown
    /wp-content/plugins/images-to-posts/js/dropzone.js?ver=6.3.1 433:14 Uncaught Error: No URL provided.
    • > GET request to /wp-admin/admin.php?page=bip-settings-page
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught Error: Invalid dropzone element.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
  • Donate link: Please fix this invalid URI: "paypal.me/adamneuwirth"
The official readme.txt might help

images-to-posts/bulk-images-to-posts.php 92% from 13 tests

The main file in "Images to Posts" v. 3.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("images-to-posts.php" instead of "bulk-images-to-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,713 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2119571,639
CSS32338503
PHP46650335
PO File26062173
Markdown131063

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin