63% ap-custom-testimonial

Code Review | Testimonial WordPress Plugin - AP Custom Testimonial

WordPress plugin Testimonial WordPress Plugin - AP Custom Testimonial scored 63% from 54 tests.

About plugin

  • Plugin page: ap-custom-testimo...
  • Plugin version: 1.4.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.8
  • WordPress version: 5.8.1
  • First release: Apr 1, 2016
  • Latest release: Nov 11, 2021
  • Number of updates: 65
  • Update frequency: every 31.6 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

5,000+ active / 88,546 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.16MB] [CPU: ▼137.47ms] Passed 4 tests

A check of server-side resources used by Testimonial WordPress Plugin - AP Custom Testimonial
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2334.71 ▲14.37
Dashboard /wp-admin3.27 ▲0.2149.77 ▲2.81
Posts /wp-admin/edit.php3.32 ▲0.2153.20 ▲7.71
Add New Post /wp-admin/post-new.php5.54 ▲0.1190.11 ▼562.59
Media Library /wp-admin/upload.php3.12 ▲0.1234.64 ▲2.21
View Testimonial /wp-admin/admin.php?page=apct_testimonial_view3.1331.51
Create Testimonial /wp-admin/admin.php?page=apct_testimonial_create3.1835.23
Edit Testimonial /wp-admin/admin.php?page=apct_testimonial_edit3.1839.17

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 65 new files
Database: 1 new table, 3 new options
New tables
wp_apct_testimonial_detail
New WordPress options
widget_apct_widget
apct_tes_fonts
apct-settings

Browser metrics Passed 4 tests

Checking browser requirements for Testimonial WordPress Plugin - AP Custom Testimonial
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,079 ▲50718.30 ▲2.5814.66 ▲4.8660.28 ▲12.86
Dashboard /wp-admin3,230 ▲2937.60 ▲1.31178.99 ▲2.37108.75 ▼2.39
Posts /wp-admin/edit.php3,028 ▲2894.15 ▲1.4587.74 ▲18.0996.45 ▲5.39
Add New Post /wp-admin/post-new.php1,939 ▲44115.99 ▼2.85378.80 ▲24.61106.00 ▲1.09
Media Library /wp-admin/upload.php1,874 ▲675.10 ▲0.06123.76 ▼43.32113.71 ▼12.07
View Testimonial /wp-admin/admin.php?page=apct_testimonial_view1,3904.1077.8171.78
Create Testimonial /wp-admin/admin.php?page=apct_testimonial_create2,5319.57205.87146.55
Edit Testimonial /wp-admin/admin.php?page=apct_testimonial_edit2,5609.52195.90162.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_apct_testimonial_detail
  • Zombie WordPress options were found after uninstall: 3 options
    • widget_apct_widget
    • apct-settings
    • apct_tes_fonts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_view
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_view_testimonial.php+6
    Undefined variable: entry_id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+41
    Undefined variable: row
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+41
    Trying to get property 'author_name' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+118
    Undefined variable: testim_description
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+118
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_view
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_view_testimonial.php+79
    Undefined variable: new_publiced_date
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=apct_testimonial_edit
    • > Notice in wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php+32
    Undefined index: id

SRP 0% 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
  • 21× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/templates/template-3.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/templates/template-1.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model/apct_new_testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model/apct_current_testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/apct-settings.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model/apct_view_testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/frontend/shortcode.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/model-control/apct-testimonial-delete.php
    • > /wp-content/plugins/ap-custom-testimonial/ap-custom-testimonial.php
    • > /wp-content/plugins/ap-custom-testimonial/inc/backend/apct-widget.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ap-custom-testimonial/inc/backend/apct-sidebar.php:14
    • > PHP Warning
      Use of undefined constant APCT_IMAGE_DIR - assumed 'APCT_IMAGE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ap-custom-testimonial/inc/backend/apct-sidebar.php on line 8

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
10 plugin tags: testimonial, simple, testimonial slider, testimonial layouts, responsive...

ap-custom-testimonial/ap-custom-testimonial.php Passed 13 tests

The main file in "Testimonial WordPress Plugin - AP Custom Testimonial" v. 1.4.7 serves as a complement to information provided in readme.txt and as the entry point to the plugin
38 characters long description:
A plugin to add testimonial to a site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,498 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS6911554,271
PHP231341162,439
SVG100565
JavaScript32529223

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity16.50
▷ Minimum class complexity8.00
▷ Maximum class complexity25.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods00.00%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
18 PNG files occupy 0.14MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/default.png5.65KB3.26KB▼ 42.31%
css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
css/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
css/images/ui-bg_glass_100_fdf5ce_1x400.png0.34KB0.16KB▼ 54.02%
css/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%