78% mfa-photo-editor

Code Review | My FastAPP Photo Editor

WordPress plugin My FastAPP Photo Editor scored78%from 54 tests.

About plugin

  • Plugin page: mfa-photo-editor
  • Plugin version: 2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.8
  • WordPress version: 6.3.1
  • First release: Feb 18, 2021
  • Latest release: Sep 6, 2021
  • Number of updates: 20
  • Update frequency: every 10.0 days
  • Top authors: sosidee (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /537 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.59MB] [CPU: ▼15.50ms] Passed 4 tests

Server-side resources used by My FastAPP Photo Editor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1247.74 ▲4.54
Dashboard /wp-admin3.43 ▲0.1256.90 ▲6.27
Posts /wp-admin/edit.php3.48 ▲0.1252.12 ▲0.04
Add New Post /wp-admin/post-new.php3.24 ▼2.6539.84 ▼70.27
Media Library /wp-admin/upload.php3.29 ▲0.0640.54 ▲3.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by My FastAPP Photo Editor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.35 ▲0.201.80 ▲0.0842.04 ▼2.37
Dashboard /wp-admin2,211 ▲315.55 ▲0.0394.01 ▲6.2140.86 ▼6.11
Posts /wp-admin/edit.php2,119 ▲191.99 ▼0.0337.98 ▲0.6134.62 ▼2.11
Add New Post /wp-admin/post-new.php1,545 ▲1923.13 ▼0.35650.45 ▲10.5051.13 ▼6.62
Media Library /wp-admin/upload.php1,416 ▲164.23 ▲0.03102.08 ▼7.7441.76 ▼3.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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 42× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/be/menu.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/metabox.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/elementor/section.php
    • > /wp-content/plugins/mfa-photo-editor/src/config.php
    • > /wp-content/plugins/mfa-photo-editor/loader.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/data/wptable.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/plugin.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/user.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/data/wpcolumntype.php
    • > /wp-content/plugins/mfa-photo-editor/sos/wp/elementor/handler.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SOSIDEE_MFA_PHOTOEDITOR\\SosPlugin' not found in wp-content/plugins/mfa-photo-editor/admin/gallery.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: scenario, photo, images, my fastapp, image...

mfa-photo-editor/mfa-photo-editor.php Passed 13 tests

"My FastAPP Photo Editor" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
115 characters long description:
Allows you to select images from the Wordpress Media Library for the Photo Editor feature of the My FastAPP plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin19,041 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
CSS163,40787,647
SVG40156,852
PHP436116124,072
JavaScript3273342
PO File13061127
HTML1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.66
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces7
Interfaces0
Traits6
Classes35
▷ Abstract classes12.86%
▷ Concrete classes3497.14%
▷ Final classes00.00%
Methods259
▷ Static methods2710.42%
▷ Public methods19474.90%
▷ Protected methods4316.60%
▷ Private methods228.49%
Functions27
▷ Named functions622.22%
▷ Anonymous functions2177.78%
Constants34
▷ Global constants12.94%
▷ Class constants3397.06%
▷ Public constants33100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.95MB with 0.68MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
data/scenario.png555.75KB165.09KB▼ 70.29%
data/scenario-thb.png41.67KB12.70KB▼ 69.53%
data/overlay.png346.27KB89.62KB▼ 74.12%
data/overlay-thb.png30.75KB8.75KB▼ 71.54%