84% post-a-pic

Code Review | Post-a-pic

WordPress plugin Post-a-pic scored84%from 54 tests.

About plugin

  • Plugin page: post-a-pic
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.1.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: Apr 22, 2015
  • Number of updates: 21
  • Update frequency: every 0.9 days
  • Top authors: starnutoditopo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,211 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.40ms] Passed 4 tests

An overview of server-side resources used by Post-a-pic
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0841.35 ▲1.07
Dashboard /wp-admin3.40 ▲0.0650.67 ▼13.03
Posts /wp-admin/edit.php3.52 ▲0.1648.62 ▲0.14
Add New Post /wp-admin/post-new.php5.99 ▲0.1086.77 ▼13.79
Media Library /wp-admin/upload.php3.33 ▲0.1040.94 ▲10.11
Post-a-pic /wp-admin/options-general.php?page=post_a_pic_plugin_settings3.2934.65

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Post-a-pic
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.201.98 ▲0.2944.51 ▲1.39
Dashboard /wp-admin2,196 ▲155.62 ▼0.0282.77 ▼19.7342.24 ▲2.41
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0037.68 ▼3.3134.03 ▼4.09
Add New Post /wp-admin/post-new.php1,531 ▲522.90 ▼0.10696.08 ▲83.9353.11 ▲0.50
Media Library /wp-admin/upload.php1,404 ▲74.17 ▼0.01106.00 ▲2.7146.44 ▲1.72
Post-a-pic /wp-admin/options-general.php?page=post_a_pic_plugin_settings9351.9928.4229.09

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-a-pic/post-a-pic.php:685

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: auto post, post, image upload

post-a-pic/post-a-pic.php Passed 13 tests

The entry point to "Post-a-pic" version 1.3 is a PHP file that has certain tags in its header comment area
110 characters long description:
Provides the facility to automatically create a post when an image is uploaded to the Wordpress media gallery.

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
There were no executable files found in this plugin472 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP196129472

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin