84% twig-anything-api-endpoints

Code Review | API Endpoints

WordPress plugin API Endpoints scored84%from 54 tests.

About plugin

  • Plugin page: twig-anything-api...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Aug 7, 2015
  • Latest release: Aug 14, 2015
  • Number of updates: 5
  • Update frequency: every 2.0 days
  • Top authors: meglio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.23ms] Passed 4 tests

This is a short check of server-side resources used by API Endpoints
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.97 ▼1.37
Dashboard /wp-admin3.41 ▲0.1065.57 ▲10.13
Posts /wp-admin/edit.php3.52 ▲0.1750.49 ▼0.66
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.20 ▼2.36
Media Library /wp-admin/upload.php3.33 ▲0.1036.85 ▼4.51
API Endpoints /wp-admin/options-general.php?page=twig_anything_api_endpoint_settings_page3.3034.88

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
twig_anything_api_endpoint_settings
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for API Endpoints
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▲0.051.64 ▼0.1243.44 ▲2.12
Dashboard /wp-admin2,199 ▲275.57 ▼0.0492.09 ▼14.9041.79 ▼3.62
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0138.69 ▼4.9434.02 ▼7.30
Add New Post /wp-admin/post-new.php1,529 ▲123.36 ▲0.26679.41 ▲16.9748.91 ▼8.46
Media Library /wp-admin/upload.php1,404 ▲74.18 ▲0.0795.69 ▼8.1347.14 ▲1.18
API Endpoints /wp-admin/options-general.php?page=twig_anything_api_endpoint_settings_page7692.0327.2427.50

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • twig_anything_api_endpoint_settings
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/twig-anything-api-endpoints/twig-anything-api-endpoints.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: You are using too many tags: 48 tag instead of maximum 10
You can take inspiration from this readme.txt

twig-anything-api-endpoints/twig-anything-api-endpoints.php 92% from 13 tests

The main PHP file in "API Endpoints" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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 detected1,429 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1146575
PHP292122450
JSX1235404

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods24
▷ Static methods1145.83%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin