84% map-categories-to-attachment

Code Review | Map Categories To Attachment

WordPress plugin Map Categories To Attachment scored84%from 54 tests.

About plugin

  • Plugin page: map-categories-to...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2013
  • Latest release: Oct 28, 2014
  • Number of updates: 5
  • Update frequency: every 87.4 days
  • Top authors: MMDeveloper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,057 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.01MB] [CPU: ▼9.87ms] Passed 4 tests

Analyzing server-side resources used by Map Categories To Attachment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.30 ▼5.84
Dashboard /wp-admin3.32 ▼0.0247.27 ▼23.79
Posts /wp-admin/edit.php3.38 ▲0.0249.25 ▲2.31
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.67 ▼12.17
Media Library /wp-admin/upload.php3.25 ▲0.0239.24 ▲3.41
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.2437.90

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
category_children
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Map Categories To Attachment
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.75 ▲0.581.82 ▲0.0042.78 ▼1.97
Dashboard /wp-admin2,196 ▲165.58 ▼0.1184.55 ▼8.6838.37 ▼6.64
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0139.24 ▲1.8237.21 ▲1.76
Add New Post /wp-admin/post-new.php1,549 ▲2323.22 ▲5.79682.03 ▼6.4555.04 ▼7.64
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.0698.98 ▼21.7545.55 ▲0.49
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,4562.1528.5333.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • category_children
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/map-categories-to-attachment/map-categories-to-attachment.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

map-categories-to-attachment/map-categories-to-attachment.php Passed 13 tests

Analyzing the main PHP file in "Map Categories To Attachment" version 1.0
58 characters long description:
Adds category meta box to attachment edit attachment page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12817102

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin