84% my-media-category

Code Review | My Media Category

WordPress plugin My Media Category scored84%from 54 tests.

About plugin

  • Plugin page: my-media-category
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2015
  • Latest release: Jul 22, 2015
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: Hemant Ahir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /682 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by My Media Category
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.76 ▼4.91
Dashboard /wp-admin3.31 ▲0.0149.74 ▼5.94
Posts /wp-admin/edit.php3.36 ▲0.0044.37 ▼5.93
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.22 ▼13.25
Media Library /wp-admin/upload.php3.23 ▲0.0038.57 ▲2.14
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment3.2334.35
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment3.2337.05

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
category_children

Browser metrics Passed 4 tests

An overview of browser requirements for My Media Category
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.18 ▼0.171.79 ▲0.1742.21 ▲0.83
Dashboard /wp-admin2,206 ▲265.63 ▼0.0290.21 ▼1.1837.04 ▼2.51
Posts /wp-admin/edit.php2,111 ▲82.02 ▲0.0136.51 ▼6.3738.01 ▼1.22
Add New Post /wp-admin/post-new.php1,542 ▲1418.11 ▼4.79613.42 ▼33.10113.10 ▲51.24
Media Library /wp-admin/upload.php1,405 ▲54.20 ▼0.00105.85 ▲2.3244.48 ▲1.47
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=attachment1,3272.1230.6028.65
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=attachment1,4632.1229.2232.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • category_children
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/my-media-category/index.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: tags, media, tag, categories, taxonmies...

my-media-category/index.php 85% from 13 tests

Analyzing the main PHP file in "My Media Category" version 1.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("my-media-category.php" instead of "index.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin93 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2245793

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.21
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin