84% get-custom-content

Code Review | GET Custom Content

WordPress plugin GET Custom Content scored84%from 54 tests.

About plugin

  • Plugin page: get-custom-content
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2013
  • Latest release: Jan 11, 2015
  • Number of updates: 5
  • Update frequency: every 83.6 days
  • Top authors: bgentry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,717 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.23ms] Passed 4 tests

A check of server-side resources used by GET Custom Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.23 ▲2.24
Dashboard /wp-admin3.38 ▲0.0349.72 ▼17.28
Posts /wp-admin/edit.php3.43 ▲0.0748.95 ▼2.69
Add New Post /wp-admin/post-new.php5.96 ▲0.0889.62 ▼19.18
Media Library /wp-admin/upload.php3.30 ▲0.0742.22 ▲5.74
Custom Content Variables /wp-admin/edit-tags.php?taxonomy=bg_gcc_vars&post_type=bg_gcc_values3.3034.14
New Value /wp-admin/post-new.php?post_type=bg_gcc_values3.4351.88
All Values /wp-admin/edit.php?post_type=bg_gcc_values3.3438.31

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_gcc_widget

Browser metrics Passed 4 tests

An overview of browser requirements for GET Custom Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.17 ▼0.431.75 ▲0.0743.15 ▲1.69
Dashboard /wp-admin2,227 ▲475.62 ▼0.0495.27 ▲6.4242.53 ▼1.16
Posts /wp-admin/edit.php2,129 ▲292.00 ▲0.0135.25 ▼2.5033.21 ▼2.14
Add New Post /wp-admin/post-new.php1,551 ▲2523.55 ▲0.54684.98 ▲8.7464.88 ▲11.35
Media Library /wp-admin/upload.php1,429 ▲294.29 ▼0.02100.66 ▼9.6550.61 ▲3.96
Custom Content Variables /wp-admin/edit-tags.php?taxonomy=bg_gcc_vars&post_type=bg_gcc_values1,3132.1628.3329.67
New Value /wp-admin/post-new.php?post_type=bg_gcc_values2,3967.56177.7664.29
All Values /wp-admin/edit.php?post_type=bg_gcc_values1,1101.9630.5229.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_gcc_widget
    • widget_recent-posts

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
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/get-custom-content/gcc.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: custom content, query variables, urls

get-custom-content/gcc.php 92% from 13 tests

The principal PHP file in "GET Custom Content" v. 1.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("get-custom-content.php" instead of "gcc.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin287 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16226287

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin