78% image-copytrack

Code Review | Image Copytrack

WordPress plugin Image Copytrack scored78%from 54 tests.

About plugin

  • Plugin page: image-copytrack
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.0
  • WordPress version: 6.3.1
  • First release: Aug 26, 2018
  • Latest release: Jul 12, 2022
  • Number of updates: 30
  • Update frequency: every 47.3 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /3,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.66ms] Passed 4 tests

This is a short check of server-side resources used by Image Copytrack
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.25 ▼2.09
Dashboard /wp-admin3.62 ▲0.2749.54 ▼9.84
Posts /wp-admin/edit.php3.66 ▲0.3053.59 ▲6.35
Add New Post /wp-admin/post-new.php6.15 ▲0.2697.15 ▼5.06
Media Library /wp-admin/upload.php3.48 ▲0.2442.89 ▲8.36
Dashboard /wp-admin/admin.php?page=meowapps-main-menu3.6561.73
Copytrack /wp-admin/admin.php?page=mct_settings-menu3.4434.18

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 184 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

This is an overview of browser requirements for Image Copytrack
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲12714.77 ▲0.391.82 ▲0.1137.98 ▼3.53
Dashboard /wp-admin2,273 ▲856.27 ▲0.40128.82 ▲24.9740.06 ▼4.49
Posts /wp-admin/edit.php2,159 ▲673.15 ▲1.1553.86 ▲14.6735.24 ▼0.04
Add New Post /wp-admin/post-new.php1,574 ▲6018.39 ▲0.99683.27 ▲7.8536.76 ▼16.08
Media Library /wp-admin/upload.php1,465 ▲775.56 ▲1.33106.50 ▲8.7346.87 ▲5.82
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,5103.8896.4098.83
Copytrack /wp-admin/admin.php?page=mct_settings-menu9424.3070.1128.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 59× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:8
    • > PHP Fatal error
      require(): Failed opening required 'MCT_PATH/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/image-copytrack/classes/core.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/psr7/src/Stream.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/psr7/src/Request.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/psr7/src/ServerRequest.php:27
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/image-copytrack/vendor/guzzlehttp/psr7/src/FnStream.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'MeowCommon_Admin' not found in wp-content/plugins/image-copytrack/classes/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/image-copytrack/vendor/psr/http-message/src/ServerRequestInterface.php:43

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=meowapps-main-menu
    • > Network (severe)
    index.php/wp-json/meow-common/v1/all_settings/ - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=meowapps-main-menu
    • > Console-api (severe) in unknown
    /wp-content/plugins/image-copytrack/app/index.js?ver=1657623818 0:151568 "[NekoError] JsonFetcher" "/index.php/wp-json/meow-common/v1/all_settings/" Object
    • > GET request to /wp-admin/admin.php?page=mct_settings-menu
    • > Network (severe)
    index.php/wp-json/image-copytrack/v1/pending - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=mct_settings-menu
    • > Network (severe)
    index.php/wp-json/image-copytrack/v1/account/ - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: copytrack, legal, photography, scan, copyright

image-copytrack/copytrack.php 77% from 13 tests

"Image Copytrack" version 1.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("image-copytrack.php" instead of "copytrack.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected13,916 lines of code in 157 files:
LanguageFilesBlank linesComment linesLines of code
PHP1282,1015,7429,610
Markdown131,15803,494
JSON1200791
make1409
YAML1007
JavaScript20245

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.83
▷ Minimum class complexity1.00
▷ Maximum class complexity88.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces10
Interfaces26
Traits3
Classes85
▷ Abstract classes00.00%
▷ Concrete classes85100.00%
▷ Final classes3440.00%
Methods806
▷ Static methods15218.86%
▷ Public methods69185.73%
▷ Protected methods40.50%
▷ Private methods11113.77%
Functions129
▷ Named functions3325.58%
▷ Anonymous functions9674.42%
Constants69
▷ Global constants68.70%
▷ Class constants6391.30%
▷ Public constants5282.54%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 compressed PNG files occupy 0.28MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
common/img/meow-lightbox.png23.16KB24.17KB0.00%
common/img/wplr-sync.png24.44KB25.67KB0.00%
common/img/social-engine.png32.81KB34.18KB0.00%
common/img/meow-analytics.png26.08KB27.72KB0.00%
common/img/contact-form-block.png32.83KB35.02KB0.00%