10% acf-post-types-tmc

Code Review | ACF Post Types TMC

WordPress plugin ACF Post Types TMC scored10%from 54 tests.

About plugin

  • Plugin page: acf-post-types-tmc
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.0-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 31, 2018
  • Latest release: Aug 31, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: themastercut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /989 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/acf-post-types-tmc/tmc-acf-post-types-fields.php+29
    require(wp-content/plugins/acf-post-types-tmc/lib/ShellPress/src/Shared/Utility/RequirementChecker.php): failed to open stream: No such file or directory

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

This is a short check of server-side resources used by ACF Post Types TMC
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.87 ▼0.75
Dashboard /wp-admin3.31 ▲0.0042.54 ▼4.78
Posts /wp-admin/edit.php3.36 ▲0.0050.55 ▲2.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.07 ▼3.26
Media Library /wp-admin/upload.php3.23 ▲0.0034.17 ▲2.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ACF Post Types TMC
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.82 ▲0.201.72 ▼0.3641.25 ▼2.60
Dashboard /wp-admin2,206 ▲215.85 ▼0.00101.14 ▼5.1741.05 ▲0.55
Posts /wp-admin/edit.php2,086 ▼02.04 ▼0.0038.99 ▲1.1234.16 ▲1.91
Add New Post /wp-admin/post-new.php1,514 ▼2917.86 ▼0.38692.01 ▲43.3556.38 ▼7.55
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0598.80 ▼3.3441.27 ▼2.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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)
Good news, no errors were detected

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
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'shellpress\\v1_2_9_1\\src\\Shared\\Components\\IComponent' not found in wp-content/plugins/acf-post-types-tmc/src/Components/Utility.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'shellpress\\v1_2_9_1\\ShellPress' not found in wp-content/plugins/acf-post-types-tmc/src/App.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-post-types-tmc/src/Fields/PostTypesFieldV5.php:13
    • > PHP Warning
      require(wp-content/plugins/acf-post-types-tmc/lib/ShellPress/src/Shared/Utility/RequirementChecker.php): failed to open stream: No such file or directory in wp-content/plugins/acf-post-types-tmc/tmc-acf-post-types-fields.php on line 29
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/acf-post-types-tmc/lib/ShellPress/src/Shared/Utility/RequirementChecker.php' (include_path='.:/usr/share/php') in wp-content/plugins/acf-post-types-tmc/tmc-acf-post-types-fields.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: acf, radio box, select post type, advanced custom field, add-on

acf-post-types-tmc/tmc-acf-post-types-fields.php 77% from 13 tests

Analyzing the main PHP file in "ACF Post Types TMC" version 1.0.2
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/langugages" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-post-types-tmc.php" instead of "tmc-acf-post-types-fields.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected133 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP486139115
JavaScript1191218

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.33
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods220.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected