84% carbon-fields-qtranslate

Code Review | Carbon Fields: qTranslate

WordPress plugin Carbon Fields: qTranslate scored84%from 54 tests.

About plugin

  • Plugin page: carbon-fields-qtr...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Dec 30, 2016
  • Latest release: Jan 5, 2017
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: ggasimzada (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.34ms] Passed 4 tests

A check of server-side resources used by Carbon Fields: qTranslate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.20 ▼4.30
Dashboard /wp-admin3.31 ▼0.0348.49 ▼18.16
Posts /wp-admin/edit.php3.36 ▲0.0150.08 ▲0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0194.10 ▼12.67
Media Library /wp-admin/upload.php3.24 ▲0.0136.59 ▼2.22

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Carbon Fields: qTranslate
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.70 ▲0.461.87 ▲0.1241.06 ▼3.00
Dashboard /wp-admin2,212 ▲355.58 ▼0.0684.17 ▼9.8844.58 ▲3.89
Posts /wp-admin/edit.php2,118 ▲182.06 ▲0.0541.52 ▲5.6137.99 ▲0.95
Add New Post /wp-admin/post-new.php1,562 ▲3123.19 ▼0.12679.82 ▲4.2463.99 ▲9.79
Media Library /wp-admin/upload.php1,411 ▲114.32 ▲0.09100.72 ▼1.8242.44 ▼3.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/carbon-fields-qtranslate/fields/Translatable_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/carbon-fields-qtranslate/carbon-fields-qtranslate.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Translatable Text Field) image required
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt is a good inspiration

carbon-fields-qtranslate/carbon-fields-qtranslate.php Passed 13 tests

The entry point to "Carbon Fields: qTranslate" version 1.0.1 is a PHP file that has certain tags in its header comment area
63 characters long description:
Extends Carbon Fields with translatable fields using qTranslate

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
Success! There were no dangerous files found in this plugin170 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2193668
Markdown125042
JavaScript18034
CSS14026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods111.11%
▷ Public methods9100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin