68% tidyant-api

Code Review | TidyAnt API

WordPress plugin TidyAnt API scored68%from 54 tests.

About plugin

  • Plugin page: tidyant-api
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Oct 17, 2018
  • Latest release: Jul 10, 2019
  • Number of updates: 15
  • Update frequency: every 17.8 days
  • Top authors: matiasregueira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.09MB] [CPU: ▼46.03ms] Passed 4 tests

A check of server-side resources used by TidyAnt API
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6214.81 ▼31.81
Dashboard /wp-admin2.93 ▼0.3719.22 ▼27.72
Posts /wp-admin/edit.php2.93 ▼0.4222.04 ▼34.12
Add New Post /wp-admin/post-new.php2.93 ▼2.9618.49 ▼90.46
Media Library /wp-admin/upload.php2.93 ▼0.3017.19 ▼15.89
Tidyant API /wp-admin/options-general.php?page=tidyant-config-admin2.9318.46

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for TidyAnt API
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲16313.89 ▼0.758.80 ▲6.6043.37 ▼1.60
Dashboard /wp-admin2,209 ▲274.81 ▼0.07107.74 ▲1.8653.43 ▲8.66
Posts /wp-admin/edit.php2,098 ▲92.04 ▼0.0138.59 ▼4.3449.28 ▲10.69
Add New Post /wp-admin/post-new.php1,518 ▼2417.83 ▼0.40587.32 ▼16.5363.54 ▲7.25
Media Library /wp-admin/upload.php1,397 ▲94.17 ▲0.0595.44 ▼17.1852.34 ▲7.94
Tidyant API /wp-admin/options-general.php?page=tidyant-config-admin8142.0626.6535.95

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tidyant-api/admin/class-repair-form.php+74
    Undefined index: action
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=tidyant-config-admin
    • > Notice in wp-content/plugins/tidyant-api/admin/class-repair-form.php+74
    Undefined index: action
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tidyant-config-admin
    • > Notice in wp-content/plugins/tidyant-api/admin/class-config.php+173
    Trying to access array offset on value of type bool

SRP 50% 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 fix the following items
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: repair in wp-content/plugins/tidyant-api/views/repair-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/tidyant-api/views/config-banner.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Tidyant_API\\Admin\\API' not found in wp-content/plugins/tidyant-api/views/repair-form.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Tidyant_API\\Admin\\Util\\Assets_Interface' not found in wp-content/plugins/tidyant-api/admin/util/class-public-js-loader.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Tidyant_API\\Admin\\Util\\Assets_Interface' not found in wp-content/plugins/tidyant-api/admin/util/class-public-css-loader.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Tidyant_API\\Admin\\Util\\Assets_Interface' not found in wp-content/plugins/tidyant-api/admin/util/class-admin-css-loader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
2 plugin tags: tidyant, api

tidyant-api/tidyant-api.php 92% from 13 tests

The main file in "TidyAnt API" v. 1.1.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 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 detected1,672 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP152074751,172
JavaScript3103190
PO File184121189
CSS3262121

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods91
▷ Static methods88.79%
▷ Public methods8795.60%
▷ Protected methods00.00%
▷ Private methods44.40%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
views/img/logo-tidyant-web.png9.54KB4.43KB▼ 53.62%