67% easy-caller-with-moceanapi

Code Review | Easy Caller with Mocean

WordPress plugin Easy Caller with Mocean scored 67% from 54 tests.

About plugin

  • Plugin page: easy-caller-with-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.0
  • WordPress version: 6.3.1
  • First release: Jun 15, 2020
  • Latest release: Apr 26, 2023
  • Number of updates: 14
  • Update frequency: every 74.9 days
  • Top authors: moceanapiplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 486 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲5.06MB] [CPU: ▲21.82ms] 75% from 4 tests

Analyzing server-side resources used by Easy Caller with Mocean
Please take the time to fix the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.06MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.79 ▲5.3264.29 ▲17.52
Dashboard /wp-admin8.81 ▲5.5077.35 ▲27.07
Posts /wp-admin/edit.php8.81 ▲5.4568.09 ▲24.44
Add New Post /wp-admin/post-new.php9.84 ▲3.95114.19 ▲18.25
Media Library /wp-admin/upload.php8.81 ▲5.5873.54 ▲34.84
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.8156.85

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 463 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
fs_accounts
fs_debug_mode
fs_gdpr
fs_active_plugins
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Easy Caller with Mocean: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18714.38 ▲0.018.23 ▲6.2827.85 ▼11.86
Dashboard /wp-admin2,244 ▲565.86 ▲0.95100.06 ▼3.2639.56 ▼3.38
Posts /wp-admin/edit.php2,130 ▲412.07 ▲0.0137.18 ▲0.4336.26 ▲5.21
Add New Post /wp-admin/post-new.php1,552 ▲1918.06 ▼5.21631.59 ▲2.2558.54 ▲1.38
Media Library /wp-admin/upload.php1,432 ▲414.15 ▲0.00100.94 ▼5.0046.48 ▲3.36
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius1,0761.7724.9626.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/easy-caller-with-moceanapi/lib/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • fs_gdpr
    • fs_accounts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • fs_debug_mode
    • widget_recent-comments
    • widget_recent-posts
    • fs_active_plugins
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-caller-with-moceanapi/lib/screen_for_machine.php
  • 118× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Promise\\Promise' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/php-http/guzzle6-adapter/src/Promise.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Mocean\\Model\\ModelInterface' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/mocean/client/src/Verify/SendCode.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/guzzlehttp/promises/src/Coroutine.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/guzzlehttp/promises/src/EachPromise.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'MoceanTest\\AbstractTesting' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/mocean/client/test/Voice/ClientTest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'MoceanTest\\AbstractTesting' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/mocean/client/test/Voice/Mc/RecordTest.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Mocean\\Client\\Credentials\\AbstractCredentials' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/mocean/client/src/Client/Credentials/Basic.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/easy-caller-with-moceanapi/lib/vendor/mocean/client/test/AbstractTesting.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in easy-caller-with-moceanapi/assets to your readme.txt
  • Tags: You are using too many tags: 13 tag instead of maximum 10
You can take inspiration from this readme.txt

easy-caller-with-moceanapi/easy-caller-mocean.php 92% from 13 tests

The primary PHP file in "Easy Caller with Mocean" version 1.1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easy-caller-with-moceanapi.php" instead of "easy-caller-mocean.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected52,763 lines of code in 400 files:
LanguageFilesBlank linesComment linesLines of code
PHP30810,21022,25745,975
Markdown241,35803,816
JSON29001,591
JavaScript757125658
XML1400536
CSS1446111
SVG10141
YAML15016
Dockerfile18010
make1409

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
The following items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity25.20
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces40
Interfaces29
Traits7
Classes190
▷ Abstract classes42.11%
▷ Concrete classes18697.89%
▷ Final classes2010.75%
Methods2,210
▷ Static methods32114.52%
▷ Public methods1,68976.43%
▷ Protected methods582.62%
▷ Private methods46320.95%
Functions303
▷ Named functions20066.01%
▷ Anonymous functions10333.99%
Constants234
▷ Global constants14461.54%
▷ Class constants9038.46%
▷ Public constants90100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
img/mocean_logo_pic.png1.59KB0.95KB▼ 40.23%
img/flags.png69.15KB23.62KB▼ 65.85%
lib/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
img/Screenshot_1.png39.04KB17.91KB▼ 54.13%