90% damedia-cpt-show-custom-fields

Code Review | DA Media CPT Show Custom Fields

WordPress plugin DA Media CPT Show Custom Fields scored90%from 54 tests.

About plugin

  • Plugin page: damedia-cpt-show-...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Oct 28, 2020
  • Latest release: Nov 9, 2020
  • Number of updates: 10
  • Update frequency: every 1.2 days
  • Top authors: damedialimited (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /389 total downloads


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.00MB] [CPU: ▼2.73ms] Passed 4 tests

A check of server-side resources used by DA Media CPT Show Custom Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.26 ▼6.76
Dashboard /wp-admin3.31 ▲0.0051.60 ▲1.25
Posts /wp-admin/edit.php3.36 ▲0.0046.98 ▲2.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.26 ▼7.65
Media Library /wp-admin/upload.php3.23 ▲0.0035.90 ▲2.77

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for DA Media CPT Show Custom Fields
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.49 ▼0.102.08 ▲0.3239.85 ▼4.97
Dashboard /wp-admin2,206 ▲184.83 ▼1.09107.61 ▼6.8540.42 ▼6.52
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.1340.38 ▲1.3334.67 ▲1.03
Add New Post /wp-admin/post-new.php1,533 ▲1323.31 ▲0.02659.15 ▼10.2658.02 ▼5.85
Media Library /wp-admin/upload.php1,385 ▼34.26 ▲0.0797.77 ▼1.4643.87 ▲1.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: metadata, hide, custom post type, cpt, custom fields...

damedia-cpt-show-custom-fields/damedia-cpt-show-custom-fields.php Passed 13 tests

This is the main PHP file of "DA Media CPT Show Custom Fields" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
133 characters long description:
Lightweight plugin to hide or show Custom Fields on on the edit page of all public Custom Post Types on your Wordpress installation.

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
Good job! No executable or dangerous file extensions detected1,697 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PO File142942941,412

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods16.25%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
inc/img/DAMLLogo.png11.57KB6.28KB▼ 45.75%