68% posting-links-with-images

Code Review | posting links with images

WordPress plugin posting links with images scored68%from 54 tests.

About plugin

  • Plugin page: posting-links-wit...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Feb 25, 2013
  • Latest release: Feb 26, 2013
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: Radicore (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,936 total downloads

Benchmarks

Plugin footprint 65% 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.93MB] [CPU: ▼38.22ms] Passed 4 tests

An overview of server-side resources used by posting links with images
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0238.01 ▼10.90
Dashboard /wp-admin3.06 ▼0.2927.66 ▼29.23
Posts /wp-admin/edit.php3.06 ▼0.3424.78 ▼26.80
Add New Post /wp-admin/post-new.php3.06 ▼2.8727.41 ▼85.96
Media Library /wp-admin/upload.php3.06 ▼0.2125.97 ▼8.49
posting links with images /wp-admin/plugins.php?page=posting-links-with-images3.1623.38

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for posting links with images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.69 ▲0.501.76 ▼0.2841.16 ▼2.08
Dashboard /wp-admin2,193 ▲195.56 ▼0.2086.72 ▼6.5438.23 ▼2.54
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0433.66 ▼3.6835.41 ▼0.07
Add New Post /wp-admin/post-new.php1,529 ▲323.12 ▼0.04640.89 ▼66.7052.44 ▼17.26
Media Library /wp-admin/upload.php1,407 ▲74.15 ▼0.06101.11 ▼9.2843.47 ▼5.06
posting links with images /wp-admin/plugins.php?page=posting-links-with-images8241.9926.6431.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=posting-links-with-images
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/plugins.php?page=posting-links-with-images
    • > Notice in wp-content/plugins/posting-links-with-images/index.php+131
    Undefined index: URL
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=posting-links-with-images
    • > Notice in wp-content/plugins/posting-links-with-images/index.php+139
    Undefined variable: tmpU
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=posting-links-with-images
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=posting-links-with-images
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/posting-links-with-images/index.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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:
  • Screenshots: Screenshot #1 (This is the screen it looks like.) image required
The official readme.txt is a good inspiration

posting-links-with-images/index.php 92% from 13 tests

Analyzing the main PHP file in "posting links with images" version 1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("posting-links-with-images.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected118 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP11530108
JavaScript1119
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png22.10KB8.94KB▼ 59.54%