74% reorder-entry-images

Code Review | Reorder Entry Images

WordPress plugin Reorder Entry Images scored74%from 54 tests.

About plugin

  • Plugin page: reorder-entry-images
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.7.2
  • WordPress version: 6.3.1
  • First release: Jul 17, 2013
  • Latest release: Mar 20, 2017
  • Number of updates: 31
  • Update frequency: every 43.5 days
  • Top authors: Vayu (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /6,257 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.72ms] Passed 4 tests

This is a short check of server-side resources used by Reorder Entry Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.52 ▼4.99
Dashboard /wp-admin3.31 ▲0.0049.49 ▼5.11
Posts /wp-admin/edit.php3.36 ▲0.0052.88 ▲3.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.33 ▼11.67
Media Library /wp-admin/upload.php3.23 ▲0.0041.28 ▲2.91

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Reorder Entry Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.084.43 ▲2.3843.60 ▼0.84
Dashboard /wp-admin2,206 ▲184.84 ▼1.12111.92 ▲5.6338.96 ▼7.25
Posts /wp-admin/edit.php2,089 ▼32.04 ▼0.0140.62 ▲0.9236.35 ▲1.79
Add New Post /wp-admin/post-new.php1,528 ▼1422.97 ▲4.93660.49 ▲9.9751.47 ▲0.11
Media Library /wp-admin/upload.php1,391 ▲64.13 ▼0.22111.15 ▲8.5049.86 ▲8.02

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 19 files (0.11MB) in the plugin directory
    • (new file) js/admin.js
    • (new file) class-reorder-entry-images.php
    • (new file) lang/reorder-entry-images-it_IT.mo
    • (new file) index.php
    • (new file) css/admin.css
    • (new file) lang/index.php
    • (new file) css/index.php
    • (new file) js/index.php
    • (new file) LICENSE.txt
    • (new file) README.txt
    • ...
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/reorder-entry-images/views/admin.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/reorder-entry-images/uninstall.php:12

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Drag & drop your images in the order you choose.), #2 (Settings page - set which post type or page to use this.)
You can take inspiration from this readme.txt

reorder-entry-images/reorder-entry-images.php Passed 13 tests

The main file in "Reorder Entry Images" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
138 characters long description:
This will get all the attachments that belong to a post or a page and display them in a list. This list can be reordered by drag and drop.

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
Success! There were no dangerous files found in this plugin467 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP596228325
CSS10052
PO File1121249
JavaScript110541

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods421.05%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.53KB10.50KB▼ 9.00%
screenshot-2.png50.20KB17.18KB▼ 65.77%