84% mapping-of-image-posts

Code Review | Mapping of image posts

WordPress plugin Mapping of image posts scored 84% from 54 tests.

About plugin

  • Plugin page: mapping-of-image-...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.6
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Aug 10, 2016
  • Number of updates: 24
  • Update frequency: every 71.6 days
  • Top authors: PressLabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,837 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.27ms] Passed 4 tests

A check of server-side resources used by Mapping of image posts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.00 ▼10.00
Dashboard /wp-admin3.36 ▲0.0556.83 ▲9.80
Posts /wp-admin/edit.php3.41 ▲0.0552.34 ▲1.23
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.28 ▼15.90
Media Library /wp-admin/upload.php3.28 ▲0.0537.93 ▼0.39
Mapping /wp-admin/tools.php?page=mapping-of-image-posts/mapping-of-image-posts.php3.2537.31

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
moip_image_type
theysaidso_admin_options
moip_out_file_type
widget_recent-posts
widget_theysaidso_widget
db_upgraded
MOIP_MAX_ATTACHMENTS_PER_SCAN
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Mapping of image posts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.32 ▼1.271.60 ▼0.9140.35 ▼5.44
Dashboard /wp-admin2,215 ▲274.90 ▲0.01110.78 ▲10.3238.28 ▼6.55
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0135.77 ▼5.1134.10 ▼2.13
Add New Post /wp-admin/post-new.php1,537 ▲1723.27 ▲0.07655.55 ▼11.3751.74 ▼5.59
Media Library /wp-admin/upload.php1,391 ▲64.24 ▲0.04100.47 ▼1.0743.72 ▼3.58
Mapping /wp-admin/tools.php?page=mapping-of-image-posts/mapping-of-image-posts.php8142.0323.9924.78

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mapping-of-image-posts/mapping-of-image-posts.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
Please take inspiration from this readme.txt

mapping-of-image-posts/mapping-of-image-posts.php Passed 13 tests

The main PHP file in "Mapping of image posts" ver. 1.2.1 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
Generate a mapping of image - article it belongs, by scanning all attachments.

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
There were no executable files found in this plugin352 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP16313299
JavaScript16044
CSS1206
Markdown1103

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected