78% auto-post-after-image-upload

Code Review | Auto Post After Image Upload

WordPress plugin Auto Post After Image Upload scored78%from 54 tests.

About plugin

  • Plugin page: auto-post-after-i...
  • Plugin version: 1.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Aug 31, 2013
  • Latest release: May 29, 2020
  • Number of updates: 16
  • Update frequency: every 154.2 days
  • Top authors: shaharia.azam (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

300+ active /12,872 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.49ms] Passed 4 tests

An overview of server-side resources used by Auto Post After Image Upload
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.06 ▼12.19
Dashboard /wp-admin3.32 ▲0.0245.25 ▼1.34
Posts /wp-admin/edit.php3.37 ▲0.0146.62 ▲2.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.82 ▼2.40
Media Library /wp-admin/upload.php3.24 ▲0.0135.49 ▲1.96
Auto Post After Image Upload /wp-admin/options-general.php?page=auto-post-after-image-upload3.2233.73

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Auto Post After Image Upload
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.23 ▼1.151.69 ▼0.0643.13 ▲0.86
Dashboard /wp-admin2,207 ▲165.80 ▼0.1096.24 ▼8.1340.82 ▼0.42
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0639.30 ▲3.6735.75 ▲1.39
Add New Post /wp-admin/post-new.php1,536 ▲1923.11 ▲5.57592.38 ▼61.7954.87 ▲4.07
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0195.20 ▼7.8339.90 ▼6.94
Auto Post After Image Upload /wp-admin/options-general.php?page=auto-post-after-image-upload1,1532.8543.8083.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=auto-post-after-image-upload
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/auto-post-after-image-upload/lib/APAIU_Functions.php+393
    unserialize() expects parameter 1 to be string, array given

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=auto-post-after-image-upload
    • > Other (warning) in unknown
    /wp-admin/options-general.php?page=auto-post-after-image-upload - Failed to decode downloaded font: https://fonts.googleapis.com/css2?family=Josefin+Sans&display=swap
    • > GET request to /wp-admin/options-general.php?page=auto-post-after-image-upload
    • > Other (warning) in unknown
    /wp-admin/options-general.php?page=auto-post-after-image-upload - OTS parsing error: invalid sfntVersion: 791289974

Optimizations

Plugin configuration 93% 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
6 plugin tags: post, auto post, image post, image upload, create post from image...

auto-post-after-image-upload/auto_post_after_image_upload.php 85% from 13 tests

Analyzing the main PHP file in "Auto Post After Image Upload" version 1.6
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 250 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("auto-post-after-image-upload.php" instead of "auto_post_after_image_upload.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected9,589 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS3679,170
PHP37535371
JavaScript471348

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity21.00
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1381.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin