78% nic-photo-editor

Code Review | NIC Photo Editor

WordPress plugin NIC Photo Editor scored78%from 54 tests.

About plugin

  • Plugin page: nic-photo-editor
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.8
  • WordPress version: 6.3.1
  • First release: Jun 1, 2013
  • Latest release: Jan 20, 2014
  • Number of updates: 24
  • Update frequency: every 9.7 days
  • Top authors: kundanyevale (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /7,230 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.02ms] Passed 4 tests

This is a short check of server-side resources used by NIC Photo Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.61 ▼6.33
Dashboard /wp-admin3.35 ▲0.0443.35 ▼5.27
Posts /wp-admin/edit.php3.40 ▲0.0449.45 ▼1.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0684.70 ▼7.17
Media Library /wp-admin/upload.php3.27 ▲0.0438.51 ▲3.33

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for NIC Photo Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.12 ▼0.171.59 ▼0.3937.20 ▼5.45
Dashboard /wp-admin2,225 ▲375.92 ▲0.04120.18 ▲4.5683.83 ▲38.72
Posts /wp-admin/edit.php2,123 ▲342.67 ▲0.6741.79 ▲2.0635.56 ▼0.53
Add New Post /wp-admin/post-new.php1,684 ▲17022.76 ▲5.11668.17 ▼20.4462.62 ▼1.98
Media Library /wp-admin/upload.php1,413 ▲255.10 ▲0.89106.75 ▼5.2477.04 ▲32.99

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 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/nic-photo-editor/add_image_frame.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_admin_url() in wp-content/plugins/nic-photo-editor/add_image_frame.php:347
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nic-photo-editor/canvas_image_frame.php:207

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: indianic canvas image, indianic image maker, indianic merge images, indianic photo editor

nic-photo-editor/canvas_image_frame.php 85% from 13 tests

This is the main PHP file of "NIC Photo Editor" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 326 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nic-photo-editor.php" instead of "canvas_image_frame.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin10,877 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,4695,15010,310
PHP215043452
CSS114099
INI10016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
10 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upload_photo.png5.03KB2.55KB▼ 49.27%
images/picture_delete.png0.63KB0.77KB0.00%
js/hv.png2.80KB7.32KB0.00%
images/view_image.png0.53KB0.67KB0.00%
images/shape_move_back.png0.40KB0.33KB▼ 19.08%