84% rex-ad-cards

Code Review | Rex Ad Cards WP

WordPress plugin Rex Ad Cards WP scored84%from 54 tests.

About plugin

  • Plugin page: rex-ad-cards
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.8
  • WordPress version: 6.3.1
  • First release: Aug 24, 2017
  • Latest release: Aug 25, 2017
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: iice74 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.73ms] Passed 4 tests

This is a short check of server-side resources used by Rex Ad Cards WP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.95 ▼3.68
Dashboard /wp-admin3.31 ▲0.0142.95 ▼7.54
Posts /wp-admin/edit.php3.36 ▲0.0145.91 ▲0.33
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.70 ▼7.49
Media Library /wp-admin/upload.php3.23 ▲0.0134.42 ▼0.21
Rex Ad Cards /wp-admin/options-general.php?page=rex-ad-cards3.2332.31

Server storage [IO: ▲0.04MB] [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
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Rex Ad Cards WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.25 ▼0.911.61 ▼0.1640.94 ▼7.03
Dashboard /wp-admin2,210 ▲224.86 ▼0.97110.00 ▼7.7840.41 ▼8.84
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0139.28 ▲6.0637.36 ▲1.38
Add New Post /wp-admin/post-new.php1,537 ▲222.96 ▲1.82604.85 ▼71.2845.10 ▼25.63
Media Library /wp-admin/upload.php1,392 ▲74.22 ▼0.0693.59 ▼9.1842.48 ▼4.52
Rex Ad Cards /wp-admin/options-general.php?page=rex-ad-cards8282.0223.5145.90

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/rex-ad-cards/views/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/rex-ad-cards/views/code-snippet-missing.php:2

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 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (15 tag instead of maximum 10)
You can look at the official readme.txt

rex-ad-cards/rex-ad-cards.php Passed 13 tests

Analyzing the main PHP file in "Rex Ad Cards WP" version 1.0
110 characters long description:
Display ads you created on https://www.rexadcards.com/ to promote your own products or those of your sponsors.

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
No dangerous file extensions were detected335 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2260181
PHP34521154

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png27.51KB6.82KB▼ 75.20%