10% movingcart

Code Review | MovingCart

WordPress plugin MovingCart scored10%from 54 tests.

About plugin

  • Plugin page: movingcart
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Oct 9, 2013
  • Latest release: Dec 16, 2015
  • Number of updates: 42
  • Update frequency: every 19.3 days
  • Top authors: movingcart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,393 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.50ms] Passed 4 tests

Analyzing server-side resources used by MovingCart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.384.10 ▼39.78
Dashboard /wp-admin2.11 ▼1.246.59 ▼55.14
Posts /wp-admin/edit.php2.11 ▼1.256.29 ▼34.68
Add New Post /wp-admin/post-new.php2.11 ▼3.785.25 ▼84.39
Media Library /wp-admin/upload.php2.11 ▼1.135.14 ▼33.69

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MovingCart
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.22 ▼1.342.02 ▲0.2638.01 ▼8.52
Dashboard /wp-admin2,206 ▲154.86 ▼1.0398.33 ▼5.4638.88 ▼0.94
Posts /wp-admin/edit.php2,092 ▼02.01 ▲0.0134.98 ▼6.2033.44 ▼1.56
Add New Post /wp-admin/post-new.php1,542 ▲2823.13 ▲5.50645.08 ▲3.8051.90 ▼8.52
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0494.81 ▼8.8643.55 ▲1.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% 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 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/movingcart/tinymce/plugins/pasio/search.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: slug in wp-content/plugins/movingcart/tinymce/plugins/pasio/search.php on line 30
    • > PHP Parse error
      syntax error, unexpected end of file, expecting elseif (T_ELSEIF) or else (T_ELSE) or endif (T_ENDIF) in wp-content/plugins/movingcart/tinymce/plugins/pasio/confirm.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/movingcart/pasio.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === movingcart === )
The official readme.txt might help

movingcart/pasio.php 85% from 13 tests

The principal PHP file in "MovingCart" v. 1.2.2 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 149 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("movingcart.php" instead of "pasio.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected806 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP36125319
JavaScript58753313
CSS3251174

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tinymce/plugins/pasio/img/image.png0.60KB0.48KB▼ 19.87%
img/icon_16.png1.65KB0.55KB▼ 66.53%
tinymce/plugins/pasio/img/movingcart.png1.65KB0.65KB▼ 60.78%
tinymce/plugins/pasio/img/mc_icon.png1.34KB0.46KB▼ 65.86%