93% real-postimages

Code Review | real.PostImages

WordPress plugin real.PostImages scored 93% from 54 tests.

About plugin

  • Plugin page: real-postimages
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.5.2
  • WordPress version: 5.8.1
  • First release: Mar 31, 2015
  • Latest release: May 15, 2016
  • Number of updates: 9
  • Update frequency: every 45.7 days
  • Top authors: real.master (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,212 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼139.53ms] Passed 4 tests

A check of server-side resources used by real.PostImages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.84 ▲13.26
Dashboard /wp-admin3.09 ▲0.0444.45 ▲0.69
Posts /wp-admin/edit.php3.14 ▲0.0445.70 ▲3.54
Add New Post /wp-admin/post-new.php5.44 ▲0.0196.39 ▼559.58
Media Library /wp-admin/upload.php3.03 ▲0.0330.41 ▼2.77

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for real.PostImages
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.98 ▲0.477.45 ▼1.5045.96 ▼3.40
Dashboard /wp-admin2,970 ▲395.90 ▼0.05133.74 ▼10.01113.77 ▲7.95
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0070.72 ▲5.2288.21 ▼3.34
Add New Post /wp-admin/post-new.php1,712 ▲4017.36 ▼1.39365.07 ▲15.78114.52 ▲2.43
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.02145.71 ▼12.61125.31 ▲8.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/real-postimages/real-postImages.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/real-postimages/tpl/images.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/real-postimages/tpl/real.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #2 is missing in real-postimages/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

real-postimages/real-postImages.php 77% from 13 tests

Analyzing the main PHP file in "real.PostImages" version 1.3
Please make the necessary changes and 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
  • Description: Keep the plugin description shorter than 140 characters (currently 291 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("real-postimages.php" instead of "real-postImages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin231 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP32327121
JavaScript117451
CSS10036
PO File12223

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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