84% mc-audio-file-calculator

Code Review | MC Audio File Calculator

WordPress plugin MC Audio File Calculator scored 84% from 54 tests.

About plugin

  • Plugin page: mc-audio-file-cal...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Nov 4, 2020
  • Latest release: Jun 13, 2022
  • Number of updates: 19
  • Update frequency: every 30.8 days
  • Top authors: Mike Hickcox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 743 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.68ms] Passed 4 tests

A check of server-side resources used by MC Audio File Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.91 ▼3.97
Dashboard /wp-admin3.32 ▲0.0247.18 ▼1.51
Posts /wp-admin/edit.php3.37 ▲0.0244.18 ▼1.87
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.14 ▼17.86
Media Library /wp-admin/upload.php3.24 ▲0.0233.54 ▼3.01
MC Audio File Calculator /wp-admin/options-general.php?page=mc6397afc3.2141.51

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for MC Audio File Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4914.47 ▲0.031.93 ▲0.3347.68 ▲6.10
Dashboard /wp-admin2,210 ▲195.86 ▲0.9999.57 ▼1.3835.62 ▼8.69
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0434.60 ▼8.0034.95 ▲0.07
Add New Post /wp-admin/post-new.php1,517 ▼1117.47 ▼1.07665.21 ▲52.1850.41 ▼3.52
Media Library /wp-admin/upload.php1,395 ▲44.18 ▼0.0699.69 ▲3.5746.19 ▲2.34
MC Audio File Calculator /wp-admin/options-general.php?page=mc6397afc9292.0522.6829.39

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mc-audio-file-calculator/inc/mcafc_options.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 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
6 plugin tags: file size calculator, calculator, wav, file size, audio file...

mc-audio-file-calculator/mc-audio-file-calculator.php Passed 13 tests

"MC Audio File Calculator" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
76 characters long description:
Creates audio file size calculators on your website, both MP3 and WAV files.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin9,409 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS11,20579,052
PHP37026357

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin