10% convatic

Code Review | Convatic

WordPress plugin Convatic scored 10% from 54 tests.

About plugin

  • Plugin page: convatic
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.8
  • WordPress version: 5.8.1
  • First release: Feb 18, 2014
  • Latest release: Feb 18, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: convatic (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active / 924 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/convatic/includes/cv-functions.php+190
    Non-static method CV_Communication::valid_api_key() should not be called statically

Server metrics [RAM: ▲0.20MB] [CPU: ▼144.42ms] Passed 4 tests

This is a short check of server-side resources used by Convatic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.03 ▲0.3039.70 ▲16.19
Dashboard /wp-admin3.25 ▲0.1951.69 ▲1.52
Posts /wp-admin/edit.php3.37 ▲0.2550.35 ▲0.19
Add New Post /wp-admin/post-new.php5.61 ▲0.1794.95 ▼581.73
Media Library /wp-admin/upload.php3.20 ▲0.1936.49 ▲2.36
All Comments /wp-admin/edit-comments.php3.2640.12

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 2 new options
New WordPress options
stc_enabled
stb_enabled

Browser metrics Passed 4 tests

Convatic: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,741 ▲14515.82 ▲0.1610.59 ▲1.5345.44 ▼12.62
Dashboard /wp-admin3,008 ▲825.95 ▲0.02145.69 ▼12.30117.00 ▼3.51
Posts /wp-admin/edit.php2,779 ▲402.70 ▼0.0067.05 ▼3.7898.92 ▼1.85
Add New Post /wp-admin/post-new.php1,707 ▲2418.53 ▼0.35393.36 ▲27.31120.42 ▲6.12
Media Library /wp-admin/upload.php1,848 ▲385.00 ▼0.03161.23 ▲12.77137.89 ▲17.86
Convatic /wp-admin/convatic.php260.900.1110.59
All Comments /wp-admin/edit-comments.php2,4642.8668.66105.12

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 2 options in the database
    • stc_enabled
    • stb_enabled

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 50% 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 items
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convatic/includes/class-cv-cpts.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_comments_number() in wp-content/plugins/convatic/includes/template/comments.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convatic/includes/class-cv-cpts.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cv_valid_api_key() in wp-content/plugins/convatic/includes/class-cv-communication.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convatic/includes/class-cv-ajax.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convatic/includes/class-cv-cpts.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/convatic.php
    • > Network (severe)
    wp-admin/convatic.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: social, conversation, comment spam, facebook, twitter...

convatic/convatic.php 92% from 13 tests

This is the main PHP file of "Convatic" version 0.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 217 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected7,544 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript281,1142,4855,955
PHP7258388863
Sass1770371
CSS204289
HTML12053
JSON10013

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.75
▷ Minimum class complexity2.00
▷ Maximum class complexity32.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3286.49%
▷ Protected methods410.81%
▷ Private methods12.70%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/template/img/check-icon.png2.96KB0.41KB▼ 86.25%
includes/template/img/x-icon.png2.95KB0.41KB▼ 86.11%
includes/template/img/icon-image.png3.45KB0.74KB▼ 78.65%
includes/template/img/twitter.png3.58KB0.76KB▼ 78.63%
includes/template/img/facebook.png3.29KB0.56KB▼ 82.90%